diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2014-08-16 07:08:05 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-08-18 21:16:45 +0400 |
commit | 6bf3b813486b4528feca39d599c256f662defc14 (patch) | |
tree | af16bbb30e82a1beff126bb686d6d478c2f9eaa7 /t | |
parent | 8e5dd3d654ebb9e86e06b9ef5ca86bd6ebf44de1 (diff) |
diff --stat: mark any file larger than core.bigfilethreshold binary
Too large files may lead to failure to allocate memory. If it happens
here, it could impact quite a few commands that involve
diff. Moreover, too large files are inefficient to compare anyway (and
most likely non-text), so mark them binary and skip looking at their
content.
Noticed-by: Dale R. Worley <worley@alum.mit.edu>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t1050-large.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t1050-large.sh b/t/t1050-large.sh index 5642f84b83..00d2f33df0 100755 --- a/t/t1050-large.sh +++ b/t/t1050-large.sh @@ -112,6 +112,10 @@ test_expect_success 'diff --raw' ' git diff --raw HEAD^ ' +test_expect_success 'diff --stat' ' + git diff --stat HEAD^ HEAD +' + test_expect_success 'hash-object' ' git hash-object large1 ' |