3 test_description='server update git config'
7 test_expect_success 'setup' '
10 git commit -m "setup" &&
11 git clone ./. server &&
12 rm -fr server/.git/hooks &&
13 git remote add origin ./server &&
14 git config branch.master.remote origin &&
15 git config branch.master.merge refs/heads/master &&
19 install_post_receive_hook 'post-receive-gitconfig'
21 test_expect_success 'pushing initial value works' '
23 ! git config --list | grep foo &&
26 ../../scripts/create-gitconfig &&
27 git checkout gitconfig &&
28 echo "foo.foo=bar" > config &&
29 git commit -a -m "Set foo.foo=bar."
30 git push origin gitconfig
33 git config --list | grep foo &&
37 test_expect_success 'pushing locked works' '
38 ! test -f server/.git/locked &&
40 git checkout gitconfig &&
41 echo "foo" > locked &&
43 git commit -m "Add locked"
44 git push origin gitconfig
46 test -f server/.git/locked