diff --git a/t/t4301-merge-tree-write-tree.sh b/t/t4301-merge-tree-write-tree.sh index c5fd56df28..28ca5c38bb 100755 --- a/t/t4301-merge-tree-write-tree.sh +++ b/t/t4301-merge-tree-write-tree.sh @@ -150,7 +150,7 @@ test_expect_success 'directory rename + content conflict' ' cd dir-rename-and-content && test_write_lines 1 2 3 4 5 >foo && mkdir olddir && - for i in a b c; do echo $i >olddir/$i; done + for i in a b c; do echo $i >olddir/$i || exit 1; done && git add foo olddir && git commit -m "original" && @@ -176,7 +176,7 @@ test_expect_success 'directory rename + content conflict' ' test_expect_code 1 \ git merge-tree -z A^0 B^0 >out && - printf "\\n" >>out && + echo >>out && anonymize_hash out >actual && q_to_tab <<-\EOF | lf_to_nul >expect && HASH @@ -230,7 +230,7 @@ test_expect_success 'rename/delete handling' ' test_expect_code 1 \ git merge-tree -z A^0 B^0 >out && - printf "\\n" >>out && + echo >>out && anonymize_hash out >actual && q_to_tab <<-\EOF | lf_to_nul >expect && HASH @@ -284,7 +284,7 @@ test_expect_success 'rename/add handling' ' test_expect_code 1 \ git merge-tree -z A^0 B^0 >out && - printf "\\n" >>out && + echo >>out && # # First, check that the bar that appears at stage 3 does not @@ -351,7 +351,7 @@ test_expect_success SYMLINKS 'rename/add, where add is a mode conflict' ' test_expect_code 1 \ git merge-tree -z A^0 B^0 >out && - printf "\\n" >>out && + echo >>out && # # First, check that the bar that appears at stage 3 does not @@ -417,7 +417,7 @@ test_expect_success 'rename/rename + content conflict' ' test_expect_code 1 \ git merge-tree -z A^0 B^0 >out && - printf "\\n" >>out && + echo >>out && anonymize_hash out >actual && q_to_tab <<-\EOF | lf_to_nul >expect && HASH @@ -471,7 +471,7 @@ test_expect_success 'rename/add/delete conflict' ' test_expect_code 1 \ git merge-tree -z B^0 A^0 >out && - printf "\\n" >>out && + echo >>out && anonymize_hash out >actual && q_to_tab <<-\EOF | lf_to_nul >expect && @@ -528,7 +528,7 @@ test_expect_success 'rename/rename(2to1)/delete/delete conflict' ' test_expect_code 1 \ git merge-tree -z A^0 B^0 >out && - printf "\\n" >>out && + echo >>out && anonymize_hash out >actual && q_to_tab <<-\EOF | lf_to_nul >expect && @@ -600,7 +600,7 @@ test_expect_success 'mod6: chains of rename/rename(1to2) and add/add via collidi test_expect_code 1 \ git merge-tree -z A^0 B^0 >out && - printf "\\n" >>out && + echo >>out && # # First, check that some of the hashes that appear as stage @@ -662,7 +662,7 @@ test_expect_success 'directory rename + rename/delete + modify/delete + director cd 4-stacked-conflict && test_write_lines 1 2 3 4 5 >foo && mkdir olddir && - for i in a b c; do echo $i >olddir/$i; done + for i in a b c; do echo $i >olddir/$i || exit 1; done && git add foo olddir && git commit -m "original" && @@ -690,7 +690,7 @@ test_expect_success 'directory rename + rename/delete + modify/delete + director test_expect_code 1 \ git merge-tree -z A^0 B^0 >out && - printf "\\n" >>out && + echo >>out && anonymize_hash out >actual && q_to_tab <<-\EOF | lf_to_nul >expect && @@ -760,8 +760,8 @@ test_expect_success 'NUL terminated conflicted file "lines"' ' git commit -m "Renamed numbers" && test_expect_code 1 git merge-tree --write-tree -z tweak1 side2 >out && + echo >>out && anonymize_hash out >actual && - printf "\\n" >>actual && # Expected results: # "greeting" should merge with conflicts