@matheusbsbs / matheus-bagliano / commits / 4d175ef71d
Fork 0

t7601: extend the 'merge picks up the best result' test

The test only checked if the best result picking code works if there are multiple strategies set in the config. Add a similar one that tests if the same true if the -s option of git merge was used multiple times. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Miklos Vajna committed Jul 22, 2008 at 19:05 UTC 4d175ef71d60086b898e4d871e699794d6a93dbf
1 file changed +15
t/t7601-merge-pull-config.sh
+15
@@ -112,6 +112,21 @@ test_expect_success 'setup conflicted merge' '
112 # recusive is choosen.
113
114 test_expect_success 'merge picks up the best result' '
115 + git config --unset-all pull.twohead &&
116 + git reset --hard c5 &&
117 + git merge -s resolve c6
118 + resolve_count=$(conflict_count) &&
119 + git reset --hard c5 &&
120 + git merge -s recursive c6
121 + recursive_count=$(conflict_count) &&
122 + git reset --hard c5 &&
123 + git merge -s recursive -s resolve c6
124 + auto_count=$(conflict_count) &&
125 + test $auto_count = $recursive_count &&
126 + test $auto_count != $resolve_count
127 +'
128 +
129 +test_expect_success 'merge picks up the best result (from config)' '
130 git config pull.twohead "recursive resolve" &&
131 git reset --hard c5 &&
132 git merge -s resolve c6