Re: name-rev does not show the shortest path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 24 Aug 2007, Uwe Kleine-König wrote:

Hello Julian,

Julian Phillips wrote:
On Thu, 23 Aug 2007, Uwe Kleine-König wrote:
I want to check to which kernel version I need to upgrade to get a
certain feature.  For my case it was introduced in 0567a0c022d5b.

	zeisberg@cassiopeia:~/gsrc/linux-2.6$
	rev=0567a0c022d5b343370a343121f38fd89925de55

	zeisberg@cassiopeia:~/gsrc/linux-2.6$ git name-rev --tags $rev
	0567a0c022d5b343370a343121f38fd89925de55 tags/v2.6.22~1686^2~1^3~5

	zeisberg@cassiopeia:~/gsrc/linux-2.6$ git name-rev --refs=*-rc1 $rev
	0567a0c022d5b343370a343121f38fd89925de55
	tags/v2.6.22-rc1~1009^2~1^3~5

I don't now the underlaying algorithm, maybe it's to get a short string?

Anyhow I want to know the earliest tag that includes this patch?  Is
there something I missed?

I remember there was a similar discussion regarding describe.

git describe --contains 0567a0c022d5b

probably a 1.5.3 feature? (certainly doesn't exist in 1.5.2.2)
That command says v2.6.22~1686^2~1^3~5, too.  That is, it doesn't use
the "older" v2.6.22-rc1 tag as a basis.

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.

--
Julian

 ---
And that's the way it is...
		-- Walter Cronkite

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux