Re: [PATCH v5 15/16] Ensure that the output buffer is released after calling merge_trees()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 27, 2016, 22:15 UTC
- Message-ID
- <xmqq8twmvib5.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <a2af8827e4df9f1555821111aac92606496006be.1469547160.git.johannes.schindelin@gmx.de>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
Show 13 quoted lines
> diff --git a/merge-recursive.c b/merge-recursive.c
> index 311cfa4..a16b150 100644
> --- a/merge-recursive.c
> +++ b/merge-recursive.c
> @@ -2078,6 +2078,8 @@ int merge_recursive(struct merge_options *o,
> commit_list_insert(h2, &(*result)->parents->next);
> }
> flush_output(o);
> + if (o->buffer_output < 2)
> + strbuf_release(&o->obuf);
> if (show(o, 2))
> diff_warn_rename_limit("merge.renamelimit",
> o->needed_rename_limit, 0);Other two hunks looked good, but this one I am not sure what is going on. It this were "if call-depth says we are called by another merge_recursive, do not discard the buffer", I would understand, but why does this have to be tied to o->buffer_output being "we buffer the output but not errors"?