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: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Sep 19, 2018 at 09:14 UTC
75f3fa79c39a39fd6ca5e4bae73df4073ca97bd4
1 file changed
+1
-4
merge-recursive.c
+1
-4
@@ -1630,10 +1630,7 @@ static int handle_rename_rename_1to2(struct merge_options *o,
1630
struct merge_file_info mfi;
1631
struct diff_filespec other;
1632
struct diff_filespec *add;
1633
- if (merge_file_one(o, one->path,
1634
- &one->oid, one->mode,
1635
- &a->oid, a->mode,
1636
- &b->oid, b->mode,
1633
+ if (merge_file_1(o, one, a, b, one->path,
1634
ci->branch1, ci->branch2, &mfi))
1635
return -1;
1636