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?