From: Junio C Hamano Date: Fri, 24 Aug 2007 18:33:39 GMT Subject: Re: name-rev does not show the shortest path Message-ID: <7v6434eq9o.fsf@gitster.siamese.dyndns.org> In-Reply-To: Julian Phillips writes: > 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?