Skip to content

Commit 75f3fa7

Browse files
newrengitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 52396e1 commit 75f3fa7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

merge-recursive.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,10 +1630,7 @@ static int handle_rename_rename_1to2(struct merge_options *o,
16301630
struct merge_file_info mfi;
16311631
struct diff_filespec other;
16321632
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,
16371634
ci->branch1, ci->branch2, &mfi))
16381635
return -1;
16391636

0 commit comments

Comments
 (0)