summaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2019-08-17 18:41:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-19 17:08:03 (GMT)
commitb4db8a2b768742f4f43d4a6cdb1db39c2ffc9f7f (patch)
treeed09adf5db7d6e254b5fb76172426f33336b0b15 /builtin/checkout.c
parent98a1d3d88895a1cbc01b88627776bb4e2bfd6b84 (diff)
downloadgit-b4db8a2b768742f4f43d4a6cdb1db39c2ffc9f7f.zip
git-b4db8a2b768742f4f43d4a6cdb1db39c2ffc9f7f.tar.gz
git-b4db8a2b768742f4f43d4a6cdb1db39c2ffc9f7f.tar.bz2
merge-recursive: remove useless parameter in merge_trees()
merge_trees() took a results parameter that would only be written when opt->call_depth was positive, which is never the case now that merge_trees_internal() has been split from merge_trees(). Remove the misleading and unused parameter from merge_trees(). While at it, add some comments explaining how the output of merge_trees() and merge_recursive() differ. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index d5b946d..90e0eaf 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -708,7 +708,6 @@ static int merge_working_tree(const struct checkout_opts *opts,
* give up or do a real merge, depending on
* whether the merge flag was used.
*/
- struct tree *result;
struct tree *work;
struct tree *old_tree;
struct merge_options o;
@@ -780,8 +779,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
ret = merge_trees(&o,
new_tree,
work,
- old_tree,
- &result);
+ old_tree);
if (ret < 0)
exit(128);
ret = reset_tree(new_tree,