summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 875b8ce)
raw | patch | inline | side by side (parent: 875b8ce)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Wed, 29 Nov 2006 23:25:11 +0000 (00:25 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 3 Dec 2006 01:28:19 +0000 (17:28 -0800) |
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 <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
side's block, the former should be tested against the next block
of the other side, not vice versa.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
xdiff/xmerge.c | patch | blob | history |
diff --git a/xdiff/xmerge.c b/xdiff/xmerge.c
index 3f5dc87fd242aff10399e4318059290c58462ed1..1fe7a1b060324f1382c924ba961d983b61d49c02 100644 (file)
--- a/xdiff/xmerge.c
+++ b/xdiff/xmerge.c
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;