Restore prefer-rebase to its previous behavior--still working on tests.
[git-central.git] / tests / t2300-server-update-prefer-rebase.sh
index b7bb60c..ccc8a2a 100644 (file)
@@ -18,9 +18,7 @@ test_expect_success 'setup' '
 
 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 &&
@@ -42,9 +40,7 @@ test_expect_success 'all local changes do not need a merge' '
        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 &&
@@ -70,9 +66,7 @@ test_expect_success 'all local changes do not need a merge even with more commit
        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 &&
@@ -80,7 +74,7 @@ test_expect_success 'already shared topic changes do warrant a merge' '
        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" &&
 
@@ -93,7 +87,9 @@ test_expect_success 'already shared topic changes do warrant a merge' '
        # 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