Subject: Re: [PATCH 1/3] commit: avoid parsing non-commits in `lookup_commit_reference_gently()`

From: Junio C Hamano <[email-masked]>
Date: Thu, 19 Feb 2026 09:35:33 -0800

Justin Tobler <[email-masked]> writes:

> On 26/02/16 04:38PM, Patrick Steinhardt wrote:
>> The function `lookup_commit_reference_gently()` can be used to look up a
>> committish by object ID. As such, the function knows to peel for example
>> tag objects so that we eventually end up with the commit.
>> 
>> The function is used quite a lot throughout our tree. One such user is
>> "shallow.c" via `assign_shallow_commits_to_refs()`. The intent of this
>> function is to figure out whether a shallow push is missing any objects
>> that are required to satisfy the ref updates, and if so, which of the
>> ref updates is missing objects.
>> 
>> This is done by painting the tree with `UNINTERESTING`. We start
>> painting by calling `refs_for_each_ref()` so that we can mark all
>> existing referenced objects as the boundary of objects that we already
>> have, and which are supposed to be fully connected. The reference tips
>> are then parsed via `lookup_commit_reference_gently()`, and the commit
>> commit is then marked as uninteresting.
>
> s/commit commit/commit/

Will locally amend (no need to reroll only to fix this).

Thanks for carefully reading.