summaryrefslogtreecommitdiff
path: root/xdiff/xdiff.h
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2008-02-17 19:07:40 +0000
committerJunio C Hamano <gitster@pobox.com>2008-02-18 00:10:37 -0800
commitee95ec5d58d536243966de6ee810d345074b755e (patch)
tree082c2b30fd7042e81f1e0398d79d829a0d8c4a61 /xdiff/xdiff.h
parentf407f14deaa14ebddd0d27238523ced8eca74393 (diff)
downloadgit-ee95ec5d58d536243966de6ee810d345074b755e.tar.gz
xdl_merge(): introduce XDL_MERGE_ZEALOUS_ALNUM
When a merge conflicts, there are often common lines that are not really common, such as empty lines or lines containing a single curly bracket. With XDL_MERGE_ZEALOUS_ALNUM, we use the following heuristics: when a hunk does not contain any letters or digits, it is treated as conflicting. In other words, a conflict which used to look like this: <<<<<<< a = 1; ======= output(); >>>>>>> } } } <<<<<<< output(); ======= b = 1; >>>>>>> will look like this with ZEALOUS_ALNUM: <<<<<<< a = 1; } } } output(); ======= output(); } } } b = 1; >>>>>>> To demonstrate this, git-merge-file has been switched from XDL_MERGE_ZEALOUS to XDL_MERGE_ZEALOUS_ALNUM. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 c00ddaa6e9..413082e1fd 100644
--- a/xdiff/xdiff.h
+++ b/xdiff/xdiff.h
@@ -53,6 +53,7 @@ extern "C" {
#define XDL_MERGE_MINIMAL 0
#define XDL_MERGE_EAGER 1
#define XDL_MERGE_ZEALOUS 2
+#define XDL_MERGE_ZEALOUS_ALNUM 3
typedef struct s_mmfile {
char *ptr;