git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] load_ref_decorations(): fix decoration with tags

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Jul 13, 2021, 21:52 UTC
Message-ID
<CAN0heSqCFVqC9Ncn5r3b4dKOE80byDt_XRM3pnswixX4jFcLFA@mail.gmail.com>
In-Reply-To
<xmqqlf6928qv.fsf@gitster.g>
Earlier, Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
>>> Note how this commit could have been done as an optimization before
>>> 88473c8bae: When our peeling hits a non-tag, we won't parse that tagged
>>> object only to immediately end the loop.
>>
>> Yep, thanks for mentioning this, as it's somewhat subtle.
>
> It is too subtle that I am not sure what the paragraph wants to say.
Then:
Show 14 quoted lines
> Jeff King <peff@peff.net> writes:
>
> >> Puzzled.
> >
> > ...and the answer is that we don't need to parse it. The tag object
> > mentions the type of what it points to, and we use lookup_commit(), etc,
> > to create the object pointed to by its "tagged" field.
>
> Ahh, parse_object() on the outer tag, when instantiating the in-core
> obj, allocated an in-core object and that instance is already given
> a type from the tag object and .taggeed member points at that
> object, so it is not an "unknown" object (tag.c::parse_tag_buffer()).
>
> Totally forgot about that one; thanks.

Do you have any suggestions for how this could be explained better? I waffled on whether to add that paragraph to the commit message and when I finally did, it seems it got a little bit too succinct.

I'm about to check out for today. Maybe in the morning I can think of some clarification.

Martin
Previous: Junio C HamanoNext: Jeff King
Message 9 of 12 in “load_ref_decorations(): fix decoration with tags”
  1. load_ref_decorations(): fix decoration with tagsMartin Ågren, Jul 12, 2021
  2. Jeff KingJul 13, 2021
  3. load_ref_decorations(): fix decoration with tagsMartin Ågren, Jul 13, 2021
  4. Jeff KingJul 13, 2021
  5. Martin ÅgrenJul 13, 2021
  6. Junio C HamanoJul 13, 2021
  7. Jeff KingJul 13, 2021
  8. Junio C HamanoJul 13, 2021
  9. Martin ÅgrenJul 13, 2021
  10. Jeff KingJul 13, 2021
  11. Martin ÅgrenJul 14, 2021
  12. load_ref_decorations(): fix decoration with tagsJeff King, Jul 14, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.