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:49 UTC
Message-ID
<20070125214923.GD13874@spearce.org>
In-Reply-To
<7v7ivaailb.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
>   - We need to update the documentation to say what this new
>     number means.
Indeed; I apologize for forgetting to do that.  At this point
I'll wind up resending the patch to address everything so toss
what you have.
 
Show 14 quoted lines
> It's some number close to the number of revs since the named
> tag, but not exactly.
> 
>     $ git describe --debug 65ebe634 2>&1 | head -4
>     searching to describe 65ebe634
>      annotated        251 v2.6.20-rc5
>      annotated        427 v2.6.20-rc4
>      annotated        594 v2.6.20-rc3
>     $ git rev-list v2.6.20-rc5..65ebe634 | wc -l
>     254
>     $ git rev-list v2.6.20-rc4..65ebe634 | wc -l
>     430
> 
> And it does not seem to be always "minus 3" either.

What you skipped in the --debug output above was that we hit our internal possible tag limit (10 by default) and aborted walking the revision chain. That's why we missed 3 revs in our counting. :)

We probably should make an option to enable the count, and if the count is enabled then we'll have to pickup counting where we left off and finish it out for the chosen tag so the count is correct.

-- 
Shawn.
Previous: Junio C HamanoNext: Nicolas Pitre
Message 5 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.