Re: [PATCH 05/11] last-modified: handle repo_parse_commit() failures
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 20, 2026, 05:09 UTC
- Message-ID
- <xmqqh5lui6wg.fsf@gitster.g>
- In-Reply-To
- <xmqqldbdqciy.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 14 quoted lines
> "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'?
--- >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;