1
0
mirror of https://github.com/git/git.git synced 2024-11-18 22:14:34 +01:00
git/xdiff
Johannes Schindelin ee95ec5d58 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>
2008-02-18 00:10:37 -08:00
..
xdiff.h xdl_merge(): introduce XDL_MERGE_ZEALOUS_ALNUM 2008-02-18 00:10:37 -08:00
xdiffi.c
xdiffi.h
xemit.c
xemit.h
xinclude.h
xmacros.h
xmerge.c xdl_merge(): introduce XDL_MERGE_ZEALOUS_ALNUM 2008-02-18 00:10:37 -08:00
xprepare.c
xprepare.h
xtypes.h
xutils.c
xutils.h