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

Q: how can i find the upstream merge point of a commit?

From
IMIngo Molnar <mingo@elte.hu>
Date
Jun 8, 2011, 09:36 UTC
Message-ID
<20110608093648.GA19038@elte.hu>

This might be a FAQ, but i couldn't find an elegant Git-ish answer for it, so please bear with my stupid question :-)

In an upstream Linux kernel Git repo, with linux-next as a remote present (but -git checked out), what is the way to find out when a particular commit was merged upstream?

So for example when was 189d3c4a94 merged upstream?
The proper Git answer would be:
  $ git describe --contains 189d3c4a94
  next-20080501~97

But the next-20080501 tag is useless, and i don't have linux-next as HEAD, it's only a remote.

Right now i have this imperfect hack instead:
  $ git log --pretty=oneline 189d3c4a94.. Makefile | tail -5
Which gives this answer:
  $ git log --pretty=oneline 189d3c4a94.. Makefile | tail -5
  b8291ad07a7f3b5b990900f0001198ac23ba893e Linux 2.6.26-rc3
  492c2e476eac010962850006c49df326919b284c Linux 2.6.26-rc2
  a95bcfac2b5f353f99c6a338d77eb5584ab35d83 kbuild: escape meta characters in regular expression in make TAGS
  2ddcca36c8bcfa251724fe342c8327451988be0d Linux 2.6.26-rc1
  90ebd878a5900839106664fae40a6cc83dbe86ab kbuild: fix vmlinux.o link

So i can see that this commit went upstream in the .26 merge window and was released in .26-rc1 for the first time.

This (ab)-uses the fact that the toplevel Makefile gets edited for every release by Linus, and it does not have many other changes.

But ... it would be much nicer if i could make 'git describe --contains' work better.

Any ideas?
Thanks,
	Ingo
Next: Johannes Sixt
Message 1 of 19 in “Q: how can i find the upstream merge point of a commit?”
  1. Ingo MolnarJun 8, 2011
  2. Johannes SixtJun 8, 2011
  3. Stephen RothwellJun 8, 2011
  4. Peter ZijlstraJun 8, 2011
  5. Stephen RothwellJun 8, 2011
  6. Peter ZijlstraJun 8, 2011
  7. Ingo MolnarJun 8, 2011
  8. Sverre RabbelierJun 8, 2011
  9. Ingo MolnarJun 8, 2011
  10. Nguyen Thai Ngoc DuyJun 8, 2011
  11. Johan HerlandJun 14, 2011
  12. Jeff KingJun 14, 2011
  13. Johan HerlandJun 14, 2011
  14. Jeff KingJun 15, 2011
  15. Junio C HamanoJun 15, 2011
  16. Jeff KingJun 16, 2011
  17. Jakub NarebskiJun 16, 2011
  18. Junio C HamanoJun 8, 2011
  19. Ingo MolnarJun 8, 2011

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.