Thread (1 message) 1 message, 1 author, 2026-02-19

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

From: Junio C Hamano <hidden>
Date: 2026-02-19 17:35:36

Justin Tobler [off-list ref] writes:
On 26/02/16 04:38PM, Patrick Steinhardt wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help