Re: [PATCH 05/11] last-modified: handle repo_parse_commit() failures

Johannes Schindelin <[email protected]> Wed, 5 Aug 2026 16:27:39 +0200 (CEST)
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
Hi Junio,

On Sun, 19 Jul 2026, Junio C Hamano wrote:

> Junio C Hamano <[email protected]> writes:
> 
> > "Johannes Schindelin via GitGitGadget" <[email protected]>
> > 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

> 
> --- >8 ---
> Subject: [PATCH] fixup! last-modified: handle repo_parse_commit() failures
> 
> https://lore.kernel.org/git/[email protected]/
> 
> '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(&not_queue))) {
>  			struct commit_list *np;
>