aboutsummaryrefslogtreecommitdiff
path: root/builtin-merge-file.c
Commit message (Collapse)AuthorAge
* Merge branch 'maint'Junio C Hamano2008-03-14
|\ | | | | | | | | | | | | | | | | | | * maint: merge-file: handle empty files gracefully merge-recursive: handle file mode changes Minor wording changes in the keyboard descriptions in git-add --interactive. git fetch: Take '-n' to mean '--no-tags' quiltimport: fix misquoting of parsed -p<num> parameter git-quiltimport: better parser to grok "enhanced" series files.
| * merge-file: handle empty files gracefullyJohannes Schindelin2008-03-13
| | | | | | | | | | | | | | | | | | | | Earlier, it would error out while trying to read and/or writing them. Now, calling merge-file with empty files is neither interesting nor useful, but it is a bug that needed fixing. Noticed by Clemens Buchacher. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | xdl_merge(): introduce XDL_MERGE_ZEALOUS_ALNUMJohannes Schindelin2008-02-18
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Make every builtin-*.c file #include "builtin.h"Peter Hagervall2007-07-14
| | | | | | | | | 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>
* git-merge-file: refuse to merge binary filesJohannes Schindelin2007-06-04
| | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* move read_mmfile() into xdiff-interfaceJohannes Schindelin2006-12-21
| | | | | | | | 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>
* merge-file: support -p and -q; fix compile warningsJohannes Schindelin2006-12-06
| | | | | | | | 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>
* Add builtin merge-file, a minimal replacement for RCS mergeJohannes Schindelin2006-12-06
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>