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

Re: [PATCH] peel_onion(): add support for <rev>^{tag}

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 20, 2013, 18:03 UTC
Message-ID
<7v4ncswtfo.fsf@alter.siamese.dyndns.org>
In-Reply-To
<51C20FD1.4090203@bbn.com>
Richard Hansen <rhansen@bbn.com> writes:
> Barfing on non-tags is the feature this adds.  It's otherwise useless,
> just like <object>^{object} is useless except to barf when <object>
> doesn't exist.
Thanks.

I could buy that. And after re-reading the proposed log message, you do not quite have anything to say that. Instead, you have this:

    Note that <rev>^{tag} is not the same as <rev>^{object} when <rev> is
    not a tag:
        $ git rev-parse --verify v1.8.3.1^{}^{object}
        362de916c06521205276acb7f51c99f47db94727
        $ git rev-parse --verify v1.8.3.1^{}^{tag}
        error: v1.8.3.1^{}^{tag}: expected tag type, but the object deref...
        fatal: Needed a single revision

The latter peels v1.8.3.1 to a non-tag (i.e. a commit) and then asks to peel that commit to a tag, which will of course fail, but that is not a good example.

Perhaps something like this instead.
    Note that <rev>^{tag} can be used to make sure <rev> names a tag:
        $ git rev-parse --verify v1.8.3.1^{tag}
        $ git rev-parse --verify master^{tag}
    The former succeeds, while the latter fails.
Previous: Richard HansenNext: Ramkumar Ramachandra
Message 4 of 5 in “peel_onion(): add support for <rev>^{tag}”
  1. peel_onion(): add support for <rev>^{tag}Richard Hansen, Jun 19, 2013
  2. Junio C HamanoJun 19, 2013
  3. Richard HansenJun 19, 2013
  4. Junio C HamanoJun 20, 2013
  5. Ramkumar RamachandraJun 20, 2013

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.