diff options
author | Elijah Newren <newren@gmail.com> | 2018-09-19 18:14:32 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-20 21:33:57 +0200 |
commit | 75f3fa79c39a39fd6ca5e4bae73df4073ca97bd4 (patch) | |
tree | f36ac38593ad7c773f047928c9777eaa3869e82a | |
parent | merge-recursive: set paths correctly when three-way merging content (diff) | |
download | git-75f3fa79c39a39fd6ca5e4bae73df4073ca97bd4.tar.xz git-75f3fa79c39a39fd6ca5e4bae73df4073ca97bd4.zip |
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>
-rw-r--r-- | merge-recursive.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 99a7ac5ec7..9e4e3da672 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -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; |