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

Re: finding earliest tags descended from a given commit

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jan 27, 2007, 04:55 UTC
Message-ID
<20070127045552.GB9966@spearce.org>
In-Reply-To
<20070127044246.GC14205@fieldses.org>
"J. Bruce Fields" <bfields@fieldses.org> wrote:
Show 7 quoted lines
> That's interesting, I hadn't noticed name-rev before you and Shawn
> mentioned it.
> 
> It only finds one name, though. When I tried it just now on my
> repository what it found was a tag I'd created for an experimental
> version, which probably wouldn't be what I wanted.  (Though it might be,
> in some situations.)

Yea. Hmm. Maybe name-rev needs to learn a few more tricks, like favoring annotated tags over non-annotated ones/heads, and being able to print the top n nearest matches (e.g. 10), by displaying only one line of output per tag (or ref).

Right now I'm trying to educate describe some more. Although similar, describe has a much easier job as its very easy for it to say "that's the best name we have for the input". Part of that is because it is favoring annotated tags all of the time, and part of that is because it does this distance computation thing now and always favors the tag with the shortest distance between the tag and the input.

In the case of name-rev I'm thinking maybe its actually the longest distance annotated tag that makes sense. That is, prefer to name the input using the annotated tag which has the shortest distance between the tag and the input, but where the tag is the farthest back in history you can go when compared to any other possible tag, and yet stills contains the input in its ancestry.

-- 
Shawn.
Previous: J. Bruce FieldsNext: Junio C Hamano
Message 5 of 22 in “finding earliest tags descended from a given commit”
  1. J. Bruce FieldsJan 27, 2007
  2. Shawn O. PearceJan 27, 2007
  3. Linus TorvaldsJan 27, 2007
  4. J. Bruce FieldsJan 27, 2007
  5. Shawn O. PearceJan 27, 2007
  6. Junio C HamanoJan 27, 2007
  7. name-rev: introduce the --ref-filter=<regex> optionJohannes Schindelin, Jan 27, 2007
  8. Johannes SchindelinFeb 17, 2007
  9. Jeff KingFeb 17, 2007
  10. Johannes SchindelinFeb 17, 2007
  11. Junio C HamanoFeb 17, 2007
  12. git-name-rev: accept list of refs from userJeff King, Feb 17, 2007
  13. Jeff KingFeb 17, 2007
  14. Junio C HamanoFeb 17, 2007
  15. Jeff KingFeb 17, 2007
  16. Johannes SchindelinFeb 18, 2007
  17. Junio C HamanoFeb 17, 2007
  18. Johannes SchindelinFeb 17, 2007
  19. name-rev: introduce the --ref-filter=<pattern> optionJohannes Schindelin, Feb 17, 2007
  20. Junio C HamanoFeb 17, 2007
  21. Johannes SchindelinFeb 17, 2007
  22. Junio C HamanoFeb 17, 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.