Status: test

Not sure

What this was...
Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./merge.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff ./merge.c~current~ ./merge.c
--- ./merge.c~current~	2004-02-03 14:08:04.000000000 +1100
+++ ./merge.c	2006-05-25 09:43:58.000000000 +1000
@@ -690,6 +690,8 @@ static int next_conflict(struct point he
 				conflict_found = 1;
 			if (c2->a+c2->len < c1->b)
 				conflict_found = 1;
+			if (c1->a > 0 && c2->b > 0)
+				conflict_found = 1;
 		} else if (c1->b+c1->len == c2->a+c2->len) {
 			/* both coincidences end at same place. There is
 			 * a conflict if there is a gap in c1->b or 
@@ -711,7 +713,9 @@ static int next_conflict(struct point he
 			 * beyond the current end of c2, we have a conflict
 			 */
 			c1++;
-			if (c1->b > c2->a+c2->len)
+			if (c1->b > c2->a+c2->len ||
+			    ( c1->b == c2->a+c2->len && c1->b == c2[1].a)
+				)
 				conflict_found = 1;
 		} else {
 			/* c2 ends earlier. If the new start of c2 is
@@ -854,6 +858,11 @@ struct ci print_merge(FILE *out, struct 
 	while (!end_of_file(end_last, c1, c2)) {
 		next_conflict(end_last, c1, c2, &start_next, &end_next, a, b, c);
 		while (already_applied(c1,c2,start_next,end_next,a,b,c)) {
+#if 0
+		printf("aastart %d %d (%d,%d)  end %d %d (%d,%d)\n",
+		       start_next.in_a, start_next.pos, start_next.c1, start_next.c2,
+		       end_next.in_a, end_next.pos, end_next.c1, end_next.c2);
+#endif
 			rv.ignored++;
 			next_conflict(end_next, c1,c2,&start_next,&end_next,a,b,c);
 		}
