summaryrefslogtreecommitdiff
path: root/builtin-merge-file.c
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 /builtin-merge-file.c
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 'builtin-merge-file.c')
-rw-r--r--builtin-merge-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-merge-file.c b/builtin-merge-file.c
index 58deb62ac0..adce6d4635 100644
--- a/builtin-merge-file.c
+++ b/builtin-merge-file.c
@@ -46,7 +46,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
}
ret = xdl_merge(mmfs + 1, mmfs + 0, names[0], mmfs + 2, names[2],
- &xpp, XDL_MERGE_ZEALOUS, &result);
+ &xpp, XDL_MERGE_ZEALOUS_ALNUM, &result);
for (i = 0; i < 3; i++)
free(mmfs[i].ptr);