X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=t%2Ft4017-diff-retval.sh;h=61589853df55e063fbe6489fc9c6effc4a9f33b6;hb=cecff3a45b4660f47a58746eae42b6ddb58e1919;hp=0391a5827ea8ba196b7796b7df818f8ac860c387;hpb=6eb3adff9e3b4d37903c8a2e0e708049ad154617;p=git.git diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh index 0391a5827..61589853d 100755 --- a/t/t4017-diff-retval.sh +++ b/t/t4017-diff-retval.sh @@ -120,7 +120,6 @@ test_expect_success '--check with --no-pager returns 2 for dirty difference' ' ' - test_expect_success 'check should test not just the last line' ' echo "" >>a && git --no-pager diff --check @@ -142,4 +141,26 @@ test_expect_success 'check detects leftover conflict markers' ' git reset --hard ' +test_expect_success 'check honors conflict marker length' ' + git reset --hard && + echo ">>>>>>> boo" >>b && + echo "======" >>a && + git diff --check a && + ( + git diff --check b + test $? = 2 + ) && + git reset --hard && + echo ">>>>>>>> boo" >>b && + echo "========" >>a && + git diff --check && + echo "b conflict-marker-size=8" >.gitattributes && + ( + git diff --check b + test $? = 2 + ) && + git diff --check a && + git reset --hard +' + test_done