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

Re: Fully peel tags via for-each-ref?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 20, 2019, 05:50 UTC
Message-ID
<xmqq8srowfkv.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAGyf7-GBx3FSCQTipmkNBtnwMANg5A0FXiiPc2az0NiRLRT+xg@mail.gmail.com>
Bryan Turner <bturner@atlassian.com> writes:
> Is there any way, with "git for-each-ref", to output the "fully"
> peeled SHA of a tag's ultimate target, regardless of how many layers
> must be traversed?

I do not think I wrote it to allow different degree of peeling, not because I wanted to explicitly forbid a use case for tags that tag another tag, but simply because I didn't think of anybody using it and didn't see need to support such tags.

If %(*<stuff>) does not peel fully (I do not recall what I did offhand), because all other things in Git (like $X~0, $X^{tree}, etc.) fully peel the outer object until they get to what they want, it may even be OK to declare it a bug and "fix" the notation to fully peel tags. I dunno.

Previous: Bryan TurnerNext: Bryan Turner
Message 2 of 6 in “Fully peel tags via for-each-ref?”
  1. Bryan TurnerAug 19, 2019
  2. Junio C HamanoAug 20, 2019
  3. Bryan TurnerAug 20, 2019
  4. Jeff KingAug 21, 2019
  5. Junio C HamanoAug 22, 2019
  6. Jeff KingAug 22, 2019

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.