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

Re: git-feed-mail-list.sh

From
Junio C Hamano <junkio@cox.net>
Date
May 9, 2006, 07:32 UTC
Message-ID
<7v7j4v8xh3.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0605081951390.3718@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 15 quoted lines
> But if you want to get it for any random merges, you can always just do
>
> 	git log -11 --pretty=oneline ^$commit^ $commit^@ |
> 		sed 's/[0-9a-f]* // ; 11 s/.*/\.\.\./' 
>
> which will show up to the ten first commits that were merged (and turn the 
> eleventh one, if it exists, into "..." - that's a pretty disgusting trick 
> to make it show when you left things out).
>
> That "^$commit^ $commit^@" part is important. It may look like some 
> deranged git smiley, but it does exactly what you want it to do: take all 
> the parents of the commit, but ignore any commit reachable from the first 
> one (the "mainline" of the person who did the commit).
>
> The ^@ syntax is obviously pretty new, so it requires a modern git.

It is indeed very quite new. Merged into "master" branch at the beginning of this month.

I often wish we had a straightforward way to tell when a given feature went into the mainline, not just appeared on a topic branch. In this case, I said:

	$ git whatchanged -p -S'"^@"' master -- revision.c

to find ea4a19 commit (Apr 30 00:54:29 2006 -0700). But that was when the feature was first made on one of my topic branches, which is not what I was looking for.

By looking at gitk, I can then tell 83262e (May 1 01:54:27) merged it to "next", and 746437 (May 1 22:55:40) merged it to "master".

In general this is an unsolvable question, because I can have a topic branch forked off of the tip of "master", cook it for a few days without advancing "master" at all, and merge it to "master" after that. But such a merge will be a fast-forward.

Previous: Linus TorvaldsNext: Linus Torvalds
Message 22 of 24 in “git-feed-mail-list.sh”
  1. David WoodhouseMay 3, 2006
  2. Junio C HamanoMay 4, 2006
  3. Junio C HamanoMay 4, 2006
  4. David WoodhouseMay 8, 2006
  5. Linus TorvaldsMay 9, 2006
  6. David WoodhouseMay 9, 2006
  7. Junio C HamanoMay 9, 2006
  8. Bertrand JacquinMay 9, 2006
  9. Junio C HamanoMay 9, 2006
  10. Bertrand JacquinMay 9, 2006
  11. Linus TorvaldsMay 9, 2006
  12. David WoodhouseMay 9, 2006
  13. Junio C HamanoMay 9, 2006
  14. David WoodhouseMay 9, 2006
  15. Martin MaresMay 10, 2006
  16. Linus TorvaldsMay 9, 2006
  17. Bertrand JacquinMay 9, 2006
  18. Junio C HamanoMay 9, 2006
  19. Bertrand JacquinMay 9, 2006
  20. Junio C HamanoMay 9, 2006
  21. Linus TorvaldsMay 9, 2006
  22. Junio C HamanoMay 9, 2006
  23. Linus TorvaldsMay 9, 2006
  24. Junio C HamanoMay 9, 2006

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.