Re: [PATCH 10/13] object: add flag to `peel_object()` to verify object type
On Tue, Oct 7, 2025, at 12:58, Patrick Steinhardt wrote:
Show 8 quoted lines
> When peeling a tag to a non-tag object we repeatedly call
> `parse_object()` on the tagged object until we find the first object
> that isn't a tag. While this feels sensible at first, there is a big
> catch here: `parse_object()` doesn't actually verify the type of the
> tagged object.
>
> The relevant code path here eventually ends up in `parse_tag_buffer()`.
> Here, we parset he various fields of the tag, including the "type". Once
Show 5 quoted lines
> we've figured out the type and the tagged object ID, we call one of the
> `lookup_${type}()` functions for whatever type we have found. There is
> two possible outcomes in the successful case:
>
>[snip]