diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-03-24 19:21:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-24 19:35:34 -0700 |
commit | a757c646ee78ae21c9e8ac66dcc52e361c15c7d2 (patch) | |
tree | 192c2ed53220b1973ba21eda68bd0b847b0e0291 /t | |
parent | 8588567c96490b8d236b1bc13f9bcb0dfa118efe (diff) | |
download | git-a757c646ee78ae21c9e8ac66dcc52e361c15c7d2.tar.gz git-a757c646ee78ae21c9e8ac66dcc52e361c15c7d2.tar.xz |
diff --check: honor conflict-marker-size attribute
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t4017-diff-retval.sh | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh index 60dd2014d..92e9137d1 100755 --- a/t/t4017-diff-retval.sh +++ b/t/t4017-diff-retval.sh @@ -105,7 +105,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 @@ -127,4 +126,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 |