summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-04-10 05:38:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-04-10 05:38:34 (GMT)
commitdaaf2e8892cf3b652454c48ffd332e3c5b446b92 (patch)
treecdf705c81efd7e7916bd2bc361274ed26543fa5f /t
parent326bea47cb7315a7ee8e428dbf6b1052ffb01b00 (diff)
parenta757c646ee78ae21c9e8ac66dcc52e361c15c7d2 (diff)
downloadgit-daaf2e8892cf3b652454c48ffd332e3c5b446b92.zip
git-daaf2e8892cf3b652454c48ffd332e3c5b446b92.tar.gz
git-daaf2e8892cf3b652454c48ffd332e3c5b446b92.tar.bz2
Merge branch 'jc/conflict-marker-size' into maint
* jc/conflict-marker-size: diff --check: honor conflict-marker-size attribute
Diffstat (limited to 't')
-rwxr-xr-xt/t4017-diff-retval.sh23
1 files changed, 22 insertions, 1 deletions
diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh
index 0391a58..6158985 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