3 test_description='script pull'
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 checkout -b stable &&
17 git push origin stable
20 test_expect_success 'pull does a rebase' '
22 echo "$test_name" >a.topic1 &&
24 git commit -m "move topic1" &&
26 # Move topic1 on the server
28 git checkout topic1 &&
29 echo "$test_name" >a &&
30 git commit -a -m "move topic1 on the server" &&
35 git cat-file commit $(git rev-parse HEAD) | grep parent | wc -l | grep 1
38 #test_expect_success 'pull does a rebase but does not fuck up merges' '
39 # # Change "a" itself so we will eventually conflict
40 # gc-checkout topic2 &&
41 # echo "$test_name on topic2" >a &&
42 # git commit -a -m "move topic2" &&
44 # # Change a.topic2 as well for another commit to continue rebasing after fixing the conflict
45 # echo "$test_name on topic2" >a.topic2 &&
47 # git commit -m "move a.topic2" &&
50 # git checkout stable &&
51 # echo "$test_name on stable" >a &&
52 # git commit -a -m "move stable" &&
53 # git push origin stable &&
55 # # Move topic2 on the server, then merge stable
57 # git checkout stable &&
58 # echo "$test_name on stable server" >a.stable.server &&
59 # git add a.stable.server &&
60 # git commit -m "move stable server" &&
61 # git checkout topic2 &&
62 # echo "$test_name" >a.topic2.server &&
63 # git add a.topic2.server &&
64 # git commit -m "move topic2 on the server" &&
68 # # Merge stable locally too--should conflict
69 # git checkout topic2 &&
70 # git merge origin/stable
72 # # Now pull and see what happens