summaryrefslogtreecommitdiff
path: root/xdiff/xdiff.h
diff options
context:
space:
mode:
authorLibravatar Linus Torvalds <torvalds@osdl.org>2006-06-28 21:57:12 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-06-28 22:24:32 -0700
commita9ed376b158faf82d3685b51d546ccaeda716da3 (patch)
treeda7e9ea0736f6b8db3eb5444129a500b20c271e8 /xdiff/xdiff.h
parentcheckout -m: fix read-tree invocation (diff)
downloadtgif-a9ed376b158faf82d3685b51d546ccaeda716da3.tar.xz
xdiff: generate "anti-diffs" aka what is common to two files
This fairly trivial patch adds a new XDL_EMIT_xxx flag to tell libxdiff that we don't want to generate the _diff_ between two files, we want to see the lines that are _common_ to two files. So when you set XDL_EMIT_COMMON, xdl_diff() will do everything exactly like it used to do, but the output records it generates just contain the lines that aren't part of the diff. This is for doing things like generating the common base case for a file that was added in both branches. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'xdiff/xdiff.h')
-rw-r--r--xdiff/xdiff.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/xdiff/xdiff.h b/xdiff/xdiff.h
index 2ce10b4c0d..c9f817818a 100644
--- a/xdiff/xdiff.h
+++ b/xdiff/xdiff.h
@@ -39,6 +39,7 @@ extern "C" {
#define XDL_PATCH_IGNOREBSPACE (1 << 8)
#define XDL_EMIT_FUNCNAMES (1 << 0)
+#define XDL_EMIT_COMMON (1 << 1)
#define XDL_MMB_READONLY (1 << 0)