Re: [PATCH 2/2] unpack_trees_options: free messages when done
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 28, 2018, 12:30 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1804281428070.79@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20180428113257.25425-1-martin.agren@gmail.com>
Hi Martin,
On Sat, 28 Apr 2018, Martin Ågren wrote:
Show 12 quoted lines
> -->8--
> Subject: merge-recursive: provide pair of `unpack_trees_{start,finish}()`
>
> Rename `git_merge_trees()` to `unpack_trees_start()` and extract the
> call to `discard_index()` into a new function `unpack_trees_finish()`.
> As a result, these are called early resp. late in `merge_trees()`,
> making the resource handling clearer. The next commit will expand on
> that, teaching `..._finish()` to free more memory. (So rather than
> moving the TODO-comment, just drop it, since it will be addressed soon
> enough.)
>
> Also call `..._finish()` when `merge_trees()` returns early.Looks good! It is missing a Signed-off-by: line, and you probably want to start a new thread that also includes the "next commit", but other than that it is pretty nice and ready for contributing, methinks.
Ciao, Dscho