diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-07-11 13:05:45 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-11 13:05:45 -0700 |
commit | 77f3c3f17401a74b9036188a6a6a4fe2c4b53ccb (patch) | |
tree | 495b1e7e6400c0fb506d97bceb3bacd005f9021e /t | |
parent | e29497d28ce1ec9f76493542fcab4a8d61ca5fce (diff) | |
parent | 5430bb283b478991a979437a79e10dcbb6f20e28 (diff) | |
download | git-77f3c3f17401a74b9036188a6a6a4fe2c4b53ccb.tar.gz git-77f3c3f17401a74b9036188a6a6a4fe2c4b53ccb.tar.xz |
Merge branch 'jc/maint-diff-core-safecrlf'
"git diff" refused to even show difference when core.safecrlf is
set to true (i.e. error out) and there are offending lines in the
working tree files.
* jc/maint-diff-core-safecrlf:
diff: demote core.safecrlf=true to core.safecrlf=warn
Diffstat (limited to 't')
-rwxr-xr-x | t/t0020-crlf.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh index 1a8f44c44..e526184a0 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 && |