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

Re: [PATCH 1/2] Teach git-describe to display distances from tags.

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jan 25, 2007, 21:37 UTC
Message-ID
<20070125213712.GC13874@spearce.org>
In-Reply-To
<7vmz46ajcq.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
>  - This is purely style, but we seem to prefer %d instead of %i
>    elsewhere in the code (three existing offenders are
>    builtin-describe.c, receive-pack.c and sha1_file which we may
>    want to clean up for consistency).
I'll send a cleanup patch then for these locations.
 
Show 6 quoted lines
>  - How much damage are we talking about with this patch to
>    People's existing scripts?  I expect they all extract the
>    hash from last -g (because they cannot rely on particular
>    convention in tagnames), but I am also worried if people are
>    expecting everything that comes before the last -g is the
>    whole tag.

No way to know for sure. I almost put this as an option (e.g. "--include-distance") but didn't want everyone to need to update their existing git-describe callers to obtain this new data. I would hope that people split on last -g to get at or remove the commit SHA-1, but they probably are also assiming te tag name is everything to the left. Including the distance would certainly violate that.

-- 
Shawn.
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 15 in “Teach git-describe to display distances from tags.”
  1. 1/2 Teach git-describe to display distances from tags.Shawn O. Pearce, Jan 25, 2007
  2. Junio C HamanoJan 25, 2007
  3. Shawn O. PearceJan 25, 2007
  4. Junio C HamanoJan 25, 2007
  5. Shawn O. PearceJan 25, 2007
  6. Nicolas PitreJan 25, 2007
  7. Junio C HamanoJan 26, 2007
  8. Francis MoreauJan 26, 2007
  9. Junio C HamanoJan 26, 2007
  10. Francis MoreauJan 26, 2007
  11. Shawn O. PearceJan 26, 2007
  12. Andy ParkinsJan 26, 2007
  13. If abbrev is set to zero in git-describe, don't add the unique suffixAndy Parkins, Jan 26, 2007
  14. Jakub NarebskiJan 26, 2007
  15. Matthias LederhoferJan 26, 2007

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.