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

Funny 'git describe --contains' output

From
Greg KH <gregkh@linuxfoundation.org>
Date
Aug 29, 2012, 04:48 UTC
Message-ID
<20120829044840.GA25869@kroah.com>
Hi,

In the Linux kernel tree, commit 0136db586c028f71e7cc21cc183064ff0d5919 is a bit "odd".

If I go to look to see what release it was in, I normally do:
	$ git describe --contains 0136db586c028f71e7cc21cc183064ff0d5919
	v3.6-rc1~59^2~56^2~76
However, it really showed up first in the 3.5-rc1 kernel release, as can
be seen by doing the following:
	$ git tag --contains 0136db586c028f71e7cc21cc183064ff0d5919
	v3.5
	v3.5-rc1
	v3.5-rc2
	v3.5-rc3
	v3.5-rc4
	v3.5-rc5
	v3.5-rc6
	v3.5-rc7
	v3.6-rc1
	v3.6-rc2
	v3.6-rc3

This commit ended up coming into Linus's tree in two different places, both in 3.5-rc1 and in 3.6-rc1, through different merge requests, so it seems to be tricky to figure out when it "first" went in.

Asking Linus about this, he tried the following:
	$ git name-rev --tags 0136db586c028f71e7cc21cc183064ff0d5919
	0136db586c028f71e7cc21cc183064ff0d5919 tags/v3.6-rc1~59^2~56^2~76
	$ git rev-list 0136db586c028f71e7cc21cc183064ff0d5919..v3.5-rc1 | wc
	  11415   11415  468015
	$ git rev-list 0136db586c028f71e7cc21cc183064ff0d5919..v3.4-rc1 | wc
	  0       0       0
	$ git rev-list 0136db586c028f71e7cc21cc183064ff0d5919..v3.6-rc1 | wc
	  22279   22279  913439

which shows that there are "less" commits to get from this commit to v3.5-rc1 instead of v3.6-rc1, so something odd is going on here.

Any ideas?
I can reproduce this right now with git version 1.7.12.116.g31e0100
thanks,
greg k-h
Next: Junio C Hamano
Message 1 of 19 in “Funny 'git describe --contains' output”
  1. Greg KHAug 29, 2012
  2. Junio C HamanoAug 29, 2012
  3. Junio C HamanoAug 29, 2012
  4. Greg KHAug 29, 2012
  5. 0/3 "git name-rev --weight"Junio C Hamano, Aug 29, 2012
  6. 1/3 name-rev: lose unnecessary typedefJunio C Hamano, Aug 29, 2012
  7. 2/3 name_rev: clarify when a new tip-name is assigned to a commitJunio C Hamano, Aug 29, 2012
  8. 3/3 name-rev: --weight option (WIP)Junio C Hamano, Aug 29, 2012
  9. Junio C HamanoAug 29, 2012
  10. Jeff KingAug 30, 2012
  11. Jeff KingAug 30, 2012
  12. Junio C HamanoAug 30, 2012
  13. Jeff KingAug 30, 2012
  14. Junio C HamanoAug 30, 2012
  15. Junio C HamanoAug 30, 2012
  16. Junio C HamanoAug 30, 2012
  17. Philip OakleyAug 30, 2012
  18. Junio C HamanoAug 30, 2012
  19. Junio C HamanoAug 30, 2012

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.