X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=tests%2Ft5200-script-pull.sh;h=39e660dcb28c92a95a2641c4014d382373f45483;hb=2cc12dd1e867b34569924d6008972b98ffe353f9;hp=3bfd5e4aaf9b2a2236c90547fdccfc4401018ff2;hpb=40ae911acc61e38de4f4e7517b921dc30c9822ea;p=git-central.git diff --git a/tests/t5200-script-pull.sh b/tests/t5200-script-pull.sh index 3bfd5e4..39e660d 100644 --- a/tests/t5200-script-pull.sh +++ b/tests/t5200-script-pull.sh @@ -32,46 +32,39 @@ test_expect_success 'pull does a rebase' ' # Only one parent gc-pull && - git cat-file commit $(git rev-parse HEAD) | grep parent | wc -l | grep 1 + test 1 = $(git cat-file commit $(git rev-parse HEAD) | grep parent | wc -l) ' -#test_expect_success 'pull does a rebase but does not fuck up merges' ' -# # Change "a" itself so we will eventually conflict -# gc-checkout topic2 && -# echo "$test_name on topic2" >a && -# git commit -a -m "move topic2" && -# -# # Change a.topic2 as well for another commit to continue rebasing after fixing the conflict -# echo "$test_name on topic2" >a.topic2 && -# git add a.topic2 && -# git commit -m "move a.topic2" && -# -# # Move stable -# git checkout stable && -# echo "$test_name on stable" >a && -# git commit -a -m "move stable" && -# git push origin stable && -# -# # Move topic2 on the server, then merge stable -# cd server && -# git checkout stable && -# echo "$test_name on stable server" >a.stable.server && -# git add a.stable.server && -# git commit -m "move stable server" && -# git checkout topic2 && -# echo "$test_name" >a.topic2.server && -# git add a.topic2.server && -# git commit -m "move topic2 on the server" && -# git merge stable && -# cd .. && -# -# # Merge stable locally too--should conflict -# git checkout topic2 && -# git merge origin/stable -# -# # Now pull and see what happens -# # gc-pull -#' +test_expect_success 'pull does a rebase but does not fuck up merges' ' + gc-checkout topic2 && + echo "$test_name on topic2" >a.topic2 && + git add a.topic2 && + git commit -a -m "create topic2" && + git push origin topic2 && + + # Move stable + git checkout stable && + echo "$test_name on stable" >a && + git commit -a -m "move stable that will not be replayed" && + git push origin stable && + + # And merge stable into topic2 + git checkout topic2 && + git merge stable && + + # Move topic2 on the server + cd server && + git checkout topic2 && + echo "$test_name" >a.topic2.server && + git add a.topic2.server && + git commit -m "move topic2 on the server" && + cd .. && + + # Merge stable locally too--should conflict + git checkout topic2 && + gc-pull && + test 1 = $(git rev-list --all --pretty=oneline | grep "replayed" | wc -l) +' test_done