]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t3030-merge-recursive.sh
Sync with 2.16.6
[thirdparty/git.git] / t / t3030-merge-recursive.sh
index cdc38fe5d1a0d171aa3cdf9ac8ee73dd2cd3b18d..3563e77b374c69a138bdfa3b274b75b6094c55a7 100755 (executable)
@@ -525,20 +525,22 @@ test_expect_success 'merge-recursive w/ empty work tree - ours has rename' '
                GIT_INDEX_FILE="$PWD/ours-has-rename-index" &&
                export GIT_INDEX_FILE &&
                mkdir "$GIT_WORK_TREE" &&
-               git read-tree -i -m $c7 &&
-               git update-index --ignore-missing --refresh &&
-               git merge-recursive $c0 -- $c7 $c3 &&
-               git ls-files -s >actual-files
-       ) 2>actual-err &&
-       >expected-err &&
+               git read-tree -i -m $c7 2>actual-err &&
+               test_must_be_empty actual-err &&
+               git update-index --ignore-missing --refresh 2>actual-err &&
+               test_must_be_empty actual-err &&
+               git merge-recursive $c0 -- $c7 $c3 2>actual-err &&
+               test_must_be_empty actual-err &&
+               git ls-files -s >actual-files 2>actual-err &&
+               test_must_be_empty actual-err
+       ) &&
        cat >expected-files <<-EOF &&
        100644 $o3 0    b/c
        100644 $o0 0    c
        100644 $o0 0    d/e
        100644 $o0 0    e
        EOF
-       test_cmp expected-files actual-files &&
-       test_cmp expected-err actual-err
+       test_cmp expected-files actual-files
 '
 
 test_expect_success 'merge-recursive w/ empty work tree - theirs has rename' '
@@ -548,20 +550,22 @@ test_expect_success 'merge-recursive w/ empty work tree - theirs has rename' '
                GIT_INDEX_FILE="$PWD/theirs-has-rename-index" &&
                export GIT_INDEX_FILE &&
                mkdir "$GIT_WORK_TREE" &&
-               git read-tree -i -m $c3 &&
-               git update-index --ignore-missing --refresh &&
-               git merge-recursive $c0 -- $c3 $c7 &&
-               git ls-files -s >actual-files
-       ) 2>actual-err &&
-       >expected-err &&
+               git read-tree -i -m $c3 2>actual-err &&
+               test_must_be_empty actual-err &&
+               git update-index --ignore-missing --refresh 2>actual-err &&
+               test_must_be_empty actual-err &&
+               git merge-recursive $c0 -- $c3 $c7 2>actual-err &&
+               test_must_be_empty actual-err &&
+               git ls-files -s >actual-files 2>actual-err &&
+               test_must_be_empty actual-err
+       ) &&
        cat >expected-files <<-EOF &&
        100644 $o3 0    b/c
        100644 $o0 0    c
        100644 $o0 0    d/e
        100644 $o0 0    e
        EOF
-       test_cmp expected-files actual-files &&
-       test_cmp expected-err actual-err
+       test_cmp expected-files actual-files
 '
 
 test_expect_success 'merge removes empty directories' '