Re: [PATCH 10/19] merge-recursive: rename 'mrtree' to 'result_tree', for clarity
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 25, 2019, 20:02 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1907252159250.21907@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20190725174611.14802-11-newren@gmail.com>
Hi Elijah,
On Thu, 25 Jul 2019, Elijah Newren wrote:
> It is not at all clear what 'mr' was supposed to stand for, at least not > to me. Pick a clearer name for this variable.
I got curious, and it looks as if I introduced this in 3af244caa82 (Cumulative update of merge-recursive in C, 2006-07-27), where I moved the variable of type `struct tree` out of a `struct merge_tree_result` (probably because I found the latter a bit pointless).
The best backsplanation I have for the "mr" is therefore "merge result".
I like `result_tree` better.
Thanks, Dscho
Show 41 quoted lines
>
> Signed-off-by: Elijah Newren <newren@gmail.com>
> ---
> merge-recursive.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/merge-recursive.c b/merge-recursive.c
> index 0a90546824..61faa26c4f 100644
> --- a/merge-recursive.c
> +++ b/merge-recursive.c
> @@ -3475,7 +3475,7 @@ static int merge_recursive_internal(struct merge_options *opt,
> {
> struct commit_list *iter;
> struct commit *merged_merge_bases;
> - struct tree *mrtree;
> + struct tree *result_tree;
> int clean;
>
> if (show(opt, 4)) {
> @@ -3545,14 +3545,15 @@ static int merge_recursive_internal(struct merge_options *opt,
> repo_get_commit_tree(opt->repo, h2),
> repo_get_commit_tree(opt->repo,
> merged_merge_bases),
> - &mrtree);
> + &result_tree);
> if (clean < 0) {
> flush_output(opt);
> return clean;
> }
>
> if (opt->call_depth) {
> - *result = make_virtual_commit(opt->repo, mrtree, "merged tree");
> + *result = make_virtual_commit(opt->repo, result_tree,
> + "merged tree");
> commit_list_insert(h1, &(*result)->parents);
> commit_list_insert(h2, &(*result)->parents->next);
> }
> --
> 2.22.0.559.g28a8880890.dirty
>
>