Code

Merge branch 'mc/cd-p-pwd' into maint
[git.git] / t / t7601-merge-pull-config.sh
index 6b9f6388c7fc6f449621d73f1bb62b5fae29f223..7ba94ea99bc0785da5b398e494d23469ba44992d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='git-merge
+test_description='git merge
 
 Testing pull.* configuration parsing.'
 
@@ -112,6 +112,21 @@ test_expect_success 'setup conflicted merge' '
 # recusive is choosen.
 
 test_expect_success 'merge picks up the best result' '
+       git config --unset-all pull.twohead &&
+       git reset --hard c5 &&
+       git merge -s resolve c6
+       resolve_count=$(conflict_count) &&
+       git reset --hard c5 &&
+       git merge -s recursive c6
+       recursive_count=$(conflict_count) &&
+       git reset --hard c5 &&
+       git merge -s recursive -s resolve c6
+       auto_count=$(conflict_count) &&
+       test $auto_count = $recursive_count &&
+       test $auto_count != $resolve_count
+'
+
+test_expect_success 'merge picks up the best result (from config)' '
        git config pull.twohead "recursive resolve" &&
        git reset --hard c5 &&
        git merge -s resolve c6