summaryrefslogtreecommitdiff
path: root/Documentation
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 /Documentation
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 'Documentation')
-rw-r--r--Documentation/config.txt3
-rw-r--r--Documentation/gitattributes.txt4
2 files changed, 4 insertions, 3 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index c55c22a..3b5b24a 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -499,7 +499,8 @@ core.bigFileThreshold::
Files larger than this size are stored deflated, without
attempting delta compression. Storing large files without
delta compression avoids excessive memory usage, at the
- slight expense of increased disk usage.
+ slight expense of increased disk usage. Additionally files
+ larger than this size are always treated as binary.
+
Default is 512 MiB on all platforms. This should be reasonable
for most projects as source code and other text files can still
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 643c1ba..9b45bda 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -440,8 +440,8 @@ Unspecified::
A path to which the `diff` attribute is unspecified
first gets its contents inspected, and if it looks like
- text, it is treated as text. Otherwise it would
- generate `Binary files differ`.
+ text and is smaller than core.bigFileThreshold, it is treated
+ as text. Otherwise it would generate `Binary files differ`.
String::