docs/diff-options: clarify scope of diff-filter types
[gitweb.git] / t / t3030-merge-recursive.sh
index f7b0e599f1124c332a106a3b8df6f304382c2fa4..9a893b5fe746f03521454972199ecb2d243d79ab 100755 (executable)
@@ -575,13 +575,13 @@ test_expect_success 'merge removes empty directories' '
        test_must_fail test -d d
 '
 
-test_expect_failure 'merge-recursive simple w/submodule' '
+test_expect_success 'merge-recursive simple w/submodule' '
 
        git checkout submod &&
        git merge remove
 '
 
-test_expect_failure 'merge-recursive simple w/submodule result' '
+test_expect_success 'merge-recursive simple w/submodule result' '
 
        git ls-files -s >actual &&
        (
@@ -660,4 +660,22 @@ test_expect_success 'merging with triple rename across D/F conflict' '
        git merge other
 '
 
+test_expect_success 'merge-recursive remembers the names of all base trees' '
+       git reset --hard HEAD &&
+
+       # more trees than static slots used by oid_to_hex()
+       for commit in $c0 $c2 $c4 $c5 $c6 $c7
+       do
+               git rev-parse "$commit^{tree}"
+       done >trees &&
+
+       # ignore the return code -- it only fails because the input is weird
+       test_must_fail git -c merge.verbosity=5 merge-recursive $(cat trees) -- $c1 $c3 >out &&
+
+       # merge-recursive prints in reverse order, but we do not care
+       sort <trees >expect &&
+       sed -n "s/^virtual //p" out | sort >actual &&
+       test_cmp expect actual
+'
+
 test_done