summaryrefslogtreecommitdiff
path: root/t/t1050-large.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-08-16 03:08:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-08-18 17:16:45 (GMT)
commit6bf3b813486b4528feca39d599c256f662defc14 (patch)
treeaf16bbb30e82a1beff126bb686d6d478c2f9eaa7 /t/t1050-large.sh
parent8e5dd3d654ebb9e86e06b9ef5ca86bd6ebf44de1 (diff)
downloadgit-6bf3b813486b4528feca39d599c256f662defc14.zip
git-6bf3b813486b4528feca39d599c256f662defc14.tar.gz
git-6bf3b813486b4528feca39d599c256f662defc14.tar.bz2
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/t1050-large.sh')
-rwxr-xr-xt/t1050-large.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t1050-large.sh b/t/t1050-large.sh
index 5642f84..00d2f33 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
'