Code

diff: respect textconv in rewrite diffs
[git.git] / t / t4017-diff-retval.sh
index 0d0fb87f5732e3ecbca8a195843070539353701e..60dd2014d5ae5d5e9e168b8b60278d90ef93cc53 100755 (executable)
@@ -113,4 +113,18 @@ test_expect_success 'check should test not just the last line' '
 
 '
 
+test_expect_success 'check detects leftover conflict markers' '
+       git reset --hard &&
+       git checkout HEAD^ &&
+       echo binary >>b &&
+       git commit -m "side" b &&
+       test_must_fail git merge master &&
+       git add b && (
+               git --no-pager diff --cached --check >test.out
+               test $? = 2
+       ) &&
+       test 3 = $(grep "conflict marker" test.out | wc -l) &&
+       git reset --hard
+'
+
 test_done