mirror of
https://github.com/git/git.git
synced 2024-11-06 17:23:00 +01:00
22b6abcd08
In very obscure cases, a merge can hit an unexpected code path (where the original code went as far as saying that this was a bug). This failing merge was noticed by Alexandre Juillard. The problem is that the original file contains something like this: -- snip -- two non-empty lines before two empty lines after two empty lines -- snap -- and this snippet is reduced to _one_ empty line in _both_ new files. However, it is ambiguous as to which hunk takes the empty line: the first or the second one? Indeed in Alexandre's example files, the xdiff algorithm attributes the empty line to the first hunk in one case, and to the second hunk in the other case. (Trimming down the example files _changes_ that behaviour!) Thus, the call to xdl_merge_cmp_lines() has no chance to realize that the change is actually identical in both new files. Therefore, xdl_refine_conflicts() finds an empty diff script, which was not expected there, because (the original author of xdl_merge() thought) xdl_merge_cmp_lines() would catch that case earlier. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net> |
||
---|---|---|
.. | ||
xdiff.h | ||
xdiffi.c | ||
xdiffi.h | ||
xemit.c | ||
xemit.h | ||
xinclude.h | ||
xmacros.h | ||
xmerge.c | ||
xprepare.c | ||
xprepare.h | ||
xtypes.h | ||
xutils.c | ||
xutils.h |