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

Re: Direct ancestors from commit to HEAD

From
GGonsolo <gonsolo@gmail.com>
Date
Sep 16, 2009, 15:10 UTC
Message-ID
<4AB0FFE0.9040106@googlemail.com>
In-Reply-To
<m3vdjj2ceq.fsf@localhost.localdomain>
> I don't know whether --first-parent or --simplify-by-decoration, or
> perhaps --dense is what you want (you can also use --graph for better
> visualization).
Thank you. I think
git log --topo-order --dense --merges firstmerge..HEAD

comes very near. I still have to use "git log --topo-order", find the commit of interest, and search upwards for the next merge that is used as firstmerge above. Unfortunately there are many merges in the net branch but it basically does the job.

An example:
1. git log --topo-order, search for "Wakeup fixes" gives commit edd7fc.
2. Search backward for "^Merge" gives commit a8519d.
3. git log --topo-order --dense --merges edd7fc.., search for a8519d.
4. A search backwards for Linus gives you the merge into mainline: d7e966.

This commit is basically what I wanted to know. Even nicer would be a three-commit-line only consisting of the merge into wireless, the merge into net and the merge into mainline.

> Or use git-show-branch... :-)

I don't think I can use that since I have only a master branch sitting around.

Previous: Jakub Narebski
Message 3 of 3 in “Direct ancestors from commit to HEAD”
  1. GonsoloSep 16, 2009
  2. Jakub NarebskiSep 16, 2009
  3. GonsoloSep 16, 2009

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.