size += xdl_recs_copy(xe2, m->i2 - m->i1 + i1,
m->i1 + m->chg2 - i1, 0,
dest ? dest + size : NULL);
+ else
+ continue;
i1 = m->i1 + m->chg1;
}
size += xdl_recs_copy(xe1, i1, xe1->xdf2.nrec - i1, 0,
if (m->mode)
continue;
+ /* no sense refining a conflict when one side is empty */
+ if (m->chg1 == 0 || m->chg2 == 0)
+ continue;
+
/*
* This probably does not work outside git, since
* we have a very simple mmfile structure.
return -1;
}
if (!xscr) {
- /* If this happens, it's a bug. */
+ /* If this happens, the changes are identical. */
xdl_free_env(&xe);
- return -2;
+ m->mode = 4;
+ continue;
}
x = xscr;
m->i1 = xscr->i1 + i1;