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

Re: [PATCH] describe: output tag's ref instead of embedded name

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 18, 2020, 23:05 UTC
Message-ID
<xmqq4kvnijim.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20200218195402.GA21586@coredump.intra.peff.net>
Coming back to the original topic, ...
Show 5 quoted lines
> If a tag describes a commit, we currently output not the tag's ref but
> its embedded name. This means that when the tag is locally stored under
> a different name, the output given cannot be used to access the tag in
> any way. A warning is also emitted in this case, but the message is not
> very enlightening:

None of the above is wrong per-se, but the reason why we chose to use the real name of the tag in the tag object, while issuing a warning, was so that people can correct the mistake of storing an annotated tag A to a wrong refname Q. If "describe" gave a name based on refname Q, there is no incentive to correct the situation to use the right refname. The name that describes the commits relative to the real name of the A is *not* usable by design, until the refname is corrected (i.e. the tag is stored in the right place).

So I am not 100% confident that the original patch is a good idea.
Previous: Jeff KingNext: Junio C Hamano
Message 9 of 23 in “git-describe --tags warning: 'X' is really 'Y' here”
  1. Roland HieberFeb 5, 2020
  2. Matheus Tavares BernardinoFeb 5, 2020
  3. Jeff KingFeb 14, 2020
  4. Junio C HamanoFeb 14, 2020
  5. describe: output tag's ref instead of embedded nameMatheus Tavares, Feb 15, 2020
  6. Jeff KingFeb 16, 2020
  7. Junio C HamanoFeb 18, 2020
  8. Jeff KingFeb 18, 2020
  9. Junio C HamanoFeb 18, 2020
  10. Junio C HamanoFeb 18, 2020
  11. Jeff KingFeb 19, 2020
  12. Junio C HamanoFeb 19, 2020
  13. Jeff KingFeb 19, 2020
  14. Junio C HamanoFeb 19, 2020
  15. Jeff KingFeb 20, 2020
  16. Junio C HamanoFeb 20, 2020
  17. Matheus Tavares BernardinoFeb 20, 2020
  18. Junio C HamanoFeb 20, 2020
  19. Matheus TavaresFeb 21, 2020
  20. Junio C HamanoFeb 21, 2020
  21. Jeff KingFeb 21, 2020
  22. Jeff KingFeb 21, 2020
  23. Roland HieberFeb 19, 2020

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.