msysGit-based Git for Windows 1.x was superseded by Git for Windows 2.x
[git/mingw/4msysgit.git] / t / t5708-clone-config.sh
blob27d730c0a7209480c5349e4ace65f92c9e75c699
1 #!/bin/sh
3 test_description='tests for git clone -c key=value'
4 . ./test-lib.sh
6 test_expect_success 'clone -c sets config in cloned repo' '
7 rm -rf child &&
8 git clone -c core.foo=bar . child &&
9 echo bar >expect &&
10 git --git-dir=child/.git config core.foo >actual &&
11 test_cmp expect actual
14 test_expect_success 'clone -c can set multi-keys' '
15 rm -rf child &&
16 git clone -c core.foo=bar -c core.foo=baz . child &&
17 { echo bar; echo baz; } >expect &&
18 git --git-dir=child/.git config --get-all core.foo >actual &&
19 test_cmp expect actual
22 test_expect_success 'clone -c without a value is boolean true' '
23 rm -rf child &&
24 git clone -c core.foo . child &&
25 echo true >expect &&
26 git --git-dir=child/.git config --bool core.foo >actual &&
27 test_cmp expect actual
30 test_expect_success 'clone -c config is available during clone' '
31 echo content >file &&
32 git add file &&
33 git commit -m one &&
34 rm -rf child &&
35 git clone -c core.autocrlf . child &&
36 printf "content\\r\\n" >expect &&
37 test_cmp expect child/file
40 test_done