install_update_hook 'update-prefer-rebase'
-test_expect_success 'all local changes do not need a merge' '
- # server is on "setup"
-
+test_expect_success 'merge local changes is caught' '
# make an outstanding change for us--but do not push
echo "$test_name" >a.client1 &&
git add a.client1 &&
git reset --hard origin/master
'
-test_expect_success 'all local changes do not need a merge even with more commits after' '
- # server is on "setup"
-
+test_expect_success 'merge local changes followed by more commits is caught' '
# make an outstanding change for us--but do not push
echo "$test_name" >a.client1 &&
git add a.client1 &&
git reset --hard origin/master
'
-test_expect_success 'already shared topic changes do warrant a merge' '
- # server is on "setup"
-
+test_expect_success 'merge shared changes from another topic is okay' '
# make a change on topic for us and share it
git checkout -b topic master &&
echo "$test_name" >a.client1 &&
git commit -m "$test_name on client1 and topic" &&
git push origin topic &&
- # make an outstanding change that we will have to merge later
+ # make an outstanding on topic that is not pushed
echo "$test_name again" >>a.client1 &&
git commit -a -m "$test_name on client1 and topic again" &&
# go back to our client and it will merge in our changes
cd .. &&
git checkout master &&
+ # this should fast fwd
git pull &&
+ # this pulls in the shared branch+its new tip
git merge topic &&
git push