3 test_description='script create branch'
7 export PATH=$PATH:../../scripts
9 test_expect_success 'setup' '
12 git commit -m "setup" &&
13 git clone ./. server &&
14 rm -fr server/.git/hooks &&
15 git remote add origin ./server &&
16 git config --add branch.master.remote origin &&
17 git config --add branch.master.merge refs/heads/master &&
20 git checkout -b stable &&
21 git push origin stable
24 test_expect_success 'push only does one branch' '
26 echo "$test_name" >a &&
27 git commit -a -m "move topic1" &&
28 git rev-parse HEAD >head.topic1 &&
31 echo "$test_name" >a &&
32 git commit -a -m "move topic2" &&
33 git rev-parse HEAD >head.topic2 &&
36 git rev-parse origin/topic2 >head.origin.topic2 &&
37 git rev-parse origin/topic1 >head.origin.topic1 &&
39 test_cmp head.topic2 head.origin.topic2 &&
40 ! test_cmp head.topic2 head.origin.topic1