diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-13 09:21:36 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-13 09:21:36 +0300 |
commit | 60f335b87f005c5f6c2eee1787eed9037b90c053 (patch) | |
tree | 05a41a0772006def96b8f0734c20afd0f2411116 /t | |
parent | 6c621015f2b5028b8743da0b13293cc99fb2be6b (diff) | |
parent | 12426e114b252d130d83c3f098c4ceae3cf217e3 (diff) |
Merge branch 'jc/diff-populate-filespec-size-only-fix'
"git diff --quiet" relies on the size field in diff_filespec to be
correctly populated, but diff_populate_filespec() helper function
made an incorrect short-cut when asked only to populate the size
field for paths that need to go through convert_to_git() (e.g. CRLF
conversion).
* jc/diff-populate-filespec-size-only-fix:
diff: do not short-cut CHECK_SIZE_ONLY check in diff_populate_filespec()
Diffstat (limited to 't')
-rwxr-xr-x | t/t4035-diff-quiet.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t4035-diff-quiet.sh b/t/t4035-diff-quiet.sh index 461f4bb583..2f1737fcef 100755 --- a/t/t4035-diff-quiet.sh +++ b/t/t4035-diff-quiet.sh @@ -152,4 +152,13 @@ test_expect_success 'git diff --quiet ignores stat-change only entries' ' test_expect_code 1 git diff --quiet ' +test_expect_success 'git diff --quiet on a path that need conversion' ' + echo "crlf.txt text=auto" >.gitattributes && + printf "Hello\r\nWorld\r\n" >crlf.txt && + git add .gitattributes crlf.txt && + + printf "Hello\r\nWorld\n" >crlf.txt && + git diff --quiet crlf.txt +' + test_done |