diff options
author | Elijah Newren <newren@gmail.com> | 2019-08-17 11:41:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-08-19 10:08:03 -0700 |
commit | 10f751c06bb3dbc2afed0e80ecfbd6242e12d538 (patch) | |
tree | 8abd1dd10e8e059425f0396a94041f964421bda5 /merge-recursive.c | |
parent | merge-recursive: future-proof update_file_flags() against memory leaks (diff) | |
download | tgif-10f751c06bb3dbc2afed0e80ecfbd6242e12d538.tar.xz |
merge-recursive: remove another implicit dependency on the_repository
Commit d7cf3a96e9a0 ("merge-recursive.c: remove implicit dependency on
the_repository", 2019-01-12) and follow-ups like commit 34e7771bc644
("Use the right 'struct repository' instead of the_repository",
2019-06-27), removed most implicit uses of the_repository. Convert
calls to get_commit_tree() to instead use repo_get_commit_tree() to get
rid of another.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 1d4df952e5..88a33e6e72 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -3587,8 +3587,11 @@ int merge_recursive(struct merge_options *opt, repo_read_index(opt->repo); opt->ancestor = ancestor_name; - clean = merge_trees(opt, get_commit_tree(h1), get_commit_tree(h2), - get_commit_tree(merged_common_ancestors), + clean = merge_trees(opt, + repo_get_commit_tree(opt->repo, h1), + repo_get_commit_tree(opt->repo, h2), + repo_get_commit_tree(opt->repo, + merged_common_ancestors), &mrtree); strbuf_release(&merge_base_abbrev); if (clean < 0) { |