From: Johannes Schindelin Date: Wed, 29 Nov 2006 23:25:11 +0000 (+0100) Subject: xdl_merge(): fix thinko X-Git-Tag: v1.5.0-rc0~127^2~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=710daa83fc76f79b8f2ee9a765d297187c2c1aeb;p=git.git xdl_merge(): fix thinko If one side's block (of changed lines) ends later than the other side's block, the former should be tested against the next block of the other side, not vice versa. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- diff --git a/xdiff/xmerge.c b/xdiff/xmerge.c index 3f5dc87fd..1fe7a1b06 100644 --- a/xdiff/xmerge.c +++ b/xdiff/xmerge.c @@ -318,13 +318,13 @@ static int xdl_do_merge(xdfenv_t *xe1, xdchange_t *xscr1, const char *name1, xscr1->i1 = i2; xscr1->i2 += xscr1->chg2; xscr1->chg2 = 0; - xscr1 = xscr1->next; + xscr2 = xscr2->next; } else if (i2 > i1) { xscr2->chg1 -= i2 - i1; xscr2->i1 = i1; xscr2->i2 += xscr2->chg2; xscr2->chg2 = 0; - xscr2 = xscr2->next; + xscr1 = xscr1->next; } else { xscr1 = xscr1->next; xscr2 = xscr2->next;