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

Re: name-rev does not show the shortest path

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 24, 2007, 18:33 UTC
Message-ID
<7v6434eq9o.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<Pine.LNX.4.64.0708241615040.7313@reaper.quantumfyre.co.uk>
Julian Phillips <julian@quantumfyre.co.uk> writes:
Show 7 quoted lines
> From a quick look at the code, that's not surprising, it runs "git
> name-rev --name-only --tags" under the bonnet - so not helpful at all,
> sorry.
>
> So now I wonder how useful --contains really is ... I would have
> expected to always get the "closest" tag.  ~1009^2~1^3~5 seems closer
> than ~1686^2~1^3~5 to me ... ho hum.

The usefulness of --contains is only to provide a nicer looking shortcut to older name-rev program, as more people are already familiar with "git describe". It does not improve name-rev.

I _think_ name-rev goes for shorter-to-type tags and does not have any other heuristics. Dscho?

Previous: Julian PhillipsNext: Johannes Schindelin
Message 5 of 13 in “name-rev does not show the shortest path”
  1. Uwe Kleine-KönigAug 23, 2007
  2. Julian PhillipsAug 24, 2007
  3. Uwe Kleine-KönigAug 24, 2007
  4. Julian PhillipsAug 24, 2007
  5. Junio C HamanoAug 24, 2007
  6. Johannes SchindelinAug 25, 2007
  7. Jeff KingAug 26, 2007
  8. Johannes SchindelinAug 26, 2007
  9. Jeff KingAug 27, 2007
  10. Johannes SchindelinAug 27, 2007
  11. Johannes SchindelinAug 27, 2007
  12. name-rev: Fix non-shortest descriptionJohannes Schindelin, Aug 27, 2007
  13. Uwe Kleine-KönigAug 27, 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.