summaryrefslogtreecommitdiff
path: root/builtin-merge-file.c
AgeCommit message (Collapse)Author
2008-02-18xdl_merge(): introduce XDL_MERGE_ZEALOUS_ALNUMJohannes Schindelin
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>
2007-07-15Make every builtin-*.c file #include "builtin.h"Peter Hagervall
Make every builtin-*.c file #include "builtin.h". Also takes care of some declaration/definition mismatches. Signed-off-by: Peter Hagervall <hager@cs.umu.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-05git-merge-file: refuse to merge binary filesJohannes Schindelin
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2006-12-22move read_mmfile() into xdiff-interfaceJohannes Schindelin
read_file() was a useful function if you want to work with the xdiff stuff, so it was renamed and put into a more central place. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06merge-file: support -p and -q; fix compile warningsJohannes Schindelin
Now merge-file also understands --stdout and --quiet options. While at it, two compile warnings were fixed. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06Add builtin merge-file, a minimal replacement for RCS mergeJohannes Schindelin
merge-file has the same syntax as RCS merge, but supports only the "-L" option. For good measure, a test is added, which is quite minimal, though. [jc: further fix for compliation errors included.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>