Re: [PATCH 05/11] last-modified: handle repo_parse_commit() failures
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 5, 2026, 14:27 UTC
- Message-ID
- <7e111d67-1e43-8a4c-d4a8-7ddd923e8083@gmx.de>
- In-Reply-To
- <xmqqh5lui6wg.fsf@gitster.g>
Hi Junio,
On Sun, 19 Jul 2026, Junio C Hamano wrote:
Show 16 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > > > "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> > > writes: > > ... > >> - repo_parse_commit(lm->rev.repo, c); > >> + if (repo_parse_commit(lm->rev.repo, c)) > >> + continue; > > > > Shouldn't this be > > > > goto cleanup; > > > > instead? 'n' pulled out of not_queue may be unparseable and when we > > ignore it, don't we still want to clean up the active_paths slab for > > commit 'c'?
Correct.
Thanks, Johannes
Show 23 quoted lines
>
> --- >8 ---
> Subject: [PATCH] fixup! last-modified: handle repo_parse_commit() failures
>
> https://lore.kernel.org/git/xmqqldbdqciy.fsf@gitster.g/
>
> 'n' pulled out of not_queue may be unparseable and when we ignore
> it, we still want to clean up the active_paths slab for commit 'c'.
>
> diff --git a/builtin/last-modified.c b/builtin/last-modified.c
> index fe012b0c2e..3846244dfc 100644
> --- a/builtin/last-modified.c
> +++ b/builtin/last-modified.c
> @@ -416,7 +416,7 @@ static int last_modified_run(struct last_modified *lm)
> * in the '--not' queue.
> */
> if (repo_parse_commit(lm->rev.repo, c))
> - continue;
> + goto cleanup;
>
> while ((n = prio_queue_get(¬_queue))) {
> struct commit_list *np;
>