int no_anc_exists = 1;
int i;
- remove_entry(remove);
for (i = 1; i < o->head_idx; i++) {
if (!stages[i] || stages[i] == o->df_conflict_entry)
any_anc_missing = 1;
}
/* #1 */
- if (!head && !remote && any_anc_missing)
+ if (!head && !remote && any_anc_missing) {
+ remove_entry(remove);
return 0;
+ }
/* Under the new "aggressive" rule, we resolve mostly trivial
* cases that we historically had git-merge-one-file resolve.
if ((head_deleted && remote_deleted) ||
(head_deleted && remote && remote_match) ||
(remote_deleted && head && head_match)) {
+ remove_entry(remove);
if (index)
return deleted_entry(index, index, o);
else if (ce && !head_deleted)
verify_uptodate(index, o);
}
+ remove_entry(remove);
o->nontrivial_merge = 1;
/* #2, #3, #4, #6, #7, #9, #10, #11. */
struct cache_entry *oldtree = src[1];
struct cache_entry *newtree = src[2];
- remove_entry(remove);
if (o->merge_size != 2)
return error("Cannot do a twoway merge of %d trees",
o->merge_size);
}
else if (oldtree && !newtree && same(current, oldtree)) {
/* 10 or 11 */
+ remove_entry(remove);
return deleted_entry(oldtree, current, o);
}
else if (oldtree && newtree &&
}
else {
/* all other failures */
+ remove_entry(remove);
if (oldtree)
reject_merge(oldtree);
if (current)
}
else if (newtree)
return merged_entry(newtree, current, o);
- else
- return deleted_entry(oldtree, current, o);
+ remove_entry(remove);
+ return deleted_entry(oldtree, current, o);
}
/*