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
APAndy Parkins <andyparkins@gmail.com>
Date
Jan 26, 2007, 10:36 UTC
Message-ID
<200701261036.26012.andyparkins@gmail.com>
In-Reply-To
<7vmz4663xq.fsf@assigned-by-dhcp.cox.net>
On Friday 2007 January 26 00:13, Junio C Hamano wrote:
Show 5 quoted lines
> Hmph.  And an option --no-number to disable this is probably not
> worth it, as it forces the existing scripts that wants the
> tagname to be updated to pass that new option.  If the users
> need to update their scripts anyway, they can sed/expr the
> number out just as easily as passing the new option.
Actually, the more useful switch would be "--tag-only"; then
x=$(git-describe HEAD | sed 's/-g*//')
In scripts could become
x=$(git-describe --tag-only HEAD)

Then, the suffix can be anything we want, and can change in the future without affecting these scripts.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
Previous: Shawn O. PearceNext: Andy Parkins
Message 12 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.