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

merge-recursive: avoid wrapper function when unnecessary and wasteful

merge_file_one() is a convenience function taking a bunch of oids and
modes, combining each pair into a diff_filespec, and then calling
merge_file_1().  When we already start with diff_filespec's, we can
just call merge_file_1() directly instead of splitting out the oids
and modes for the wrapper to recombine into what we already had.
Signed-off-by: NElijah Newren <newren@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 52396e1d
......@@ -1630,10 +1630,7 @@ static int handle_rename_rename_1to2(struct merge_options *o,
struct merge_file_info mfi;
struct diff_filespec other;
struct diff_filespec *add;
if (merge_file_one(o, one->path,
&one->oid, one->mode,
&a->oid, a->mode,
&b->oid, b->mode,
if (merge_file_1(o, one, a, b, one->path,
ci->branch1, ci->branch2, &mfi))
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册