git/xdiff
Johannes Schindelin f407f14dea xdl_merge(): make XDL_MERGE_ZEALOUS output simpler
When a merge conflicts, there are often less than three common lines
between two conflicting regions.

Since a conflict takes up as many lines as are conflicting, plus three
lines for the commit markers,  the output will be shorter (and thus,
simpler) in this case, if the common lines will be merged into the
conflicting regions.

This patch merges up to three common lines into the conflicts.

For example, what looked like this before this patch:

	<<<<<<<
	if (a == 1)
	=======
	if (a != 0)
	>>>>>>>
	{
		int i;
	<<<<<<<
		a = 0;
	=======
		a = !a;
	>>>>>>>

will now look like this:

	<<<<<<<
	if (a == 1)
	{
		int i;
		a = 0;
	=======
	if (a != 0)
	{
		int i;
		a = !a;
	>>>>>>>

Suggested Linus (based on ideas by "Voltage Spike" -- if that name is
real, it is mighty cool).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-18 00:08:40 -08:00
..
xdiff.h Per-path attribute based hunk header selection. 2007-07-06 01:20:47 -07:00
xdiffi.c Remove unreachable statements 2007-11-15 21:23:47 -08:00
xdiffi.h War on whitespace 2007-06-07 00:04:01 -07:00
xemit.c Per-path attribute based hunk header selection. 2007-07-06 01:20:47 -07:00
xemit.h War on whitespace 2007-06-07 00:04:01 -07:00
xinclude.h War on whitespace 2007-06-07 00:04:01 -07:00
xmacros.h War on whitespace 2007-06-07 00:04:01 -07:00
xmerge.c xdl_merge(): make XDL_MERGE_ZEALOUS output simpler 2008-02-18 00:08:40 -08:00
xprepare.c War on whitespace 2007-06-07 00:04:01 -07:00
xprepare.h War on whitespace 2007-06-07 00:04:01 -07:00
xtypes.h War on whitespace 2007-06-07 00:04:01 -07:00
xutils.c Remove unreachable statements 2007-11-15 21:23:47 -08:00
xutils.h War on whitespace 2007-06-07 00:04:01 -07:00