summaryrefslogtreecommitdiff
path: root/xdiff-interface.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-09-28 15:28:26 -0700
committerJunio C Hamano <gitster@pobox.com>2015-09-28 15:28:31 -0700
commit6343e2f6f271cf344ea8e7384342502faecaf37c (patch)
tree50abed20e4b930022a24b64389915f7c774acef9 /xdiff-interface.h
parent74b67638166ca2e66497ede559dbf393e7af8b40 (diff)
parent18b58f707fdb3ad7d3d4931bd40693834c9ec8a0 (diff)
downloadgit-6343e2f6f271cf344ea8e7384342502faecaf37c.tar.gz
Sync with 2.3.10
Diffstat (limited to 'xdiff-interface.h')
-rw-r--r--xdiff-interface.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/xdiff-interface.h b/xdiff-interface.h
index eff7762ee1..fbb5a1c394 100644
--- a/xdiff-interface.h
+++ b/xdiff-interface.h
@@ -3,6 +3,13 @@
#include "xdiff/xdiff.h"
+/*
+ * xdiff isn't equipped to handle content over a gigabyte;
+ * we make the cutoff 1GB - 1MB to give some breathing
+ * room for constant-sized additions (e.g., merge markers)
+ */
+#define MAX_XDIFF_SIZE (1024UL * 1024 * 1023)
+
typedef void (*xdiff_emit_consume_fn)(void *, char *, unsigned long);
int xdi_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, xdemitconf_t const *xecfg, xdemitcb_t *ecb);