3 test_description='server update prefer underscores in branch names'
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 --add branch.master.remote origin &&
15 git config --add branch.master.merge refs/heads/master &&
17 git checkout -b stable &&
18 git push origin stable
21 install_update_hook 'update-prefer-underscores'
23 test_expect_success 'pushing topic_topic works' '
24 git checkout -b topic_topic &&
25 echo "$test_name" >a &&
26 git commit -a -m "$test_name on topic_topic" &&
27 git push origin topic_topic
30 test_expect_success 'pushing topicTopic fails' '
31 git checkout -b topicTopic &&
32 echo "$test_name" >a &&
33 git commit -a -m "$test_name on topicTopic" &&
34 ! git push origin topicTopic 2>push.err &&
35 cat push.err | grep "Please use underscored branch names"