提交 dcf28150 编写于 作者: E Elijah Newren 提交者: Junio C Hamano

merge-recursive: use handle_file_collision for add/add conflicts

This results in no-net change of behavior, it simply ensures that all
file-collision conflict handling types are being handled the same by
calling the same function.
Signed-off-by: NElijah Newren <newren@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 bbafc9c4
......@@ -3355,14 +3355,27 @@ static int process_entry(struct merge_options *o,
clean_merge = -1;
}
} else if (a_oid && b_oid) {
/* Case C: Added in both (check for same permissions) and */
/* case D: Modified in both, but differently. */
int is_dirty = 0; /* unpack_trees would have bailed if dirty */
clean_merge = handle_content_merge(o, path, is_dirty,
o_oid, o_mode,
a_oid, a_mode,
b_oid, b_mode,
NULL);
if (!o_oid) {
/* Case C: Added in both (check for same permissions) */
output(o, 1,
_("CONFLICT (add/add): Merge conflict in %s"),
path);
clean_merge = handle_file_collision(o,
path, NULL, NULL,
o->branch1,
o->branch2,
a_oid, a_mode,
b_oid, b_mode);
} else {
/* case D: Modified in both, but differently. */
int is_dirty = 0; /* unpack_trees would have bailed if dirty */
clean_merge = handle_content_merge(o, path,
is_dirty,
o_oid, o_mode,
a_oid, a_mode,
b_oid, b_mode,
NULL);
}
} else if (!o_oid && !a_oid && !b_oid) {
/*
* this entry was deleted altogether. a_mode == 0 means
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册