summaryrefslogtreecommitdiff
path: root/diffcore.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-08-16 10:08:05 +0700
committerJunio C Hamano <gitster@pobox.com>2014-08-18 10:16:45 -0700
commit6bf3b813486b4528feca39d599c256f662defc14 (patch)
treeaf16bbb30e82a1beff126bb686d6d478c2f9eaa7 /diffcore.h
parent8e5dd3d654ebb9e86e06b9ef5ca86bd6ebf44de1 (diff)
downloadgit-6bf3b813486b4528feca39d599c256f662defc14.tar.gz
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 'diffcore.h')
-rw-r--r--diffcore.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/diffcore.h b/diffcore.h
index c80df18f3c..33ea2de348 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -56,6 +56,7 @@ extern void fill_filespec(struct diff_filespec *, const unsigned char *,
int, unsigned short);
#define CHECK_SIZE_ONLY 1
+#define CHECK_BINARY 2
extern int diff_populate_filespec(struct diff_filespec *, unsigned int);
extern void diff_free_filespec_data(struct diff_filespec *);
extern void diff_free_filespec_blob(struct diff_filespec *);