summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-22 05:48:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-22 05:48:13 (GMT)
commit82ec54dc8bbb653faa64638d74129e45aea3326b (patch)
treed3ca5f57694f8551da4a8fec7feb0f6504e59b90 /t
parent7c8ce4ed32aec3b86a271c2661ad9dfb0084c3f9 (diff)
parent5430bb283b478991a979437a79e10dcbb6f20e28 (diff)
downloadgit-82ec54dc8bbb653faa64638d74129e45aea3326b.zip
git-82ec54dc8bbb653faa64638d74129e45aea3326b.tar.gz
git-82ec54dc8bbb653faa64638d74129e45aea3326b.tar.bz2
Merge branch 'jc/maint-diff-core-safecrlf' into maint
Avoid failing "git diff" when core.safecrlf is set to true, because the user cannot tell where the breakage is in preparation for fixing and committing. * jc/maint-diff-core-safecrlf: diff: demote core.safecrlf=true to core.safecrlf=warn
Diffstat (limited to 't')
-rwxr-xr-xt/t0020-crlf.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index 1a8f44c..e526184 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -81,6 +81,14 @@ test_expect_success 'safecrlf: print warning only once' '
test $(git add doublewarn 2>&1 | grep "CRLF will be replaced by LF" | wc -l) = 1
'
+
+test_expect_success 'safecrlf: git diff demotes safecrlf=true to warn' '
+ git config core.autocrlf input &&
+ git config core.safecrlf true &&
+ git diff HEAD
+'
+
+
test_expect_success 'switch off autocrlf, safecrlf, reset HEAD' '
git config core.autocrlf false &&
git config core.safecrlf false &&