3 test_description='server update git config'
7 test_expect_success 'setup' '
10 git commit -m "setup" &&
11 git clone -l . --bare server.git &&
12 rm -fr server.git/hooks &&
13 git remote add origin ./server.git &&
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' '
22 ! GIT_DIR=server.git git config --list | grep foo &&
24 ../../scripts/create-gitconfig &&
25 git checkout gitconfig &&
26 echo "foo.foo=bar" > config &&
27 git commit -a -m "Set foo.foo=bar."
28 git push origin gitconfig
30 GIT_DIR=server.git git config --list | grep foo
33 test_expect_success 'pushing locked works' '
34 ! test -f server.git/locked &&
36 git checkout gitconfig &&
37 echo "foo" > locked &&
39 git commit -m "Add locked"
40 git push origin gitconfig
42 test -f server.git/locked