{"thread":{"id":"20971","subject":"Direct ancestors from commit to HEAD","startedAt":"2009-09-16T14:01:36Z","lastAt":"2009-09-16T15:10:24Z","messageCount":3,"participants":["Gonsolo","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"123350","messageId":"4AB0EFC0.8020005@googlemail.com","threadId":"20971","inReplyTo":null,"subject":"Direct ancestors from commit to HEAD","fromName":"Gonsolo","fromEmail":"gonsolo@gmail.com","sentAt":"2009-09-16T14:01:36Z","receivedAt":"2009-09-16T14:01:36Z","isPatch":false,"sender":{"key":"gonsolo@gmail.com","avatar":null},"body":"Is there a way to see only the direct line of (merge) ancestors from \npatch to HEAD? Something like:\n\ncommit 0cb583fd2862f19ea88b02eb307d11c09e51e2f8\nMerge: 723e9db... a2d1056...\nAuthor: Linus Torvalds <torvalds@linux-foundation.org>\nDate:   Tue Sep 15 10:01:16 2009 -0700\n\n\tMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6\n\ncommit 88512935a24305fea7aecc9ba4d675869e97fc2a\nMerge: 8a62bab... 6b26dea...\nAuthor: David S. Miller <davem@davemloft.net>\nDate:   Fri Aug 14 12:27:19 2009 -0700\n\n\tMerge branch 'master' of \ngit://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6\n\ncommit edd7fc7003f31da48d06e215a93ea966a22c2a03\nAuthor: Nick Kossifidis <mick@madwifi-project.org>\nDate:   Mon Aug 10 03:29:02 2009 +0300\n\n     ath5k: Wakeup fixes\n\n\nHere I can see exactly how the ath5k patch came to mainline and since \nwhen it is there.\n"},{"id":"123352","messageId":"m3vdjj2ceq.fsf@localhost.localdomain","threadId":"20971","inReplyTo":"4AB0EFC0.8020005@googlemail.com","subject":"Re: Direct ancestors from commit to HEAD","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-09-16T14:26:41Z","receivedAt":"2009-09-16T14:26:41Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Gonsolo <gonsolo@gmail.com> writes:\n\n> Is there a way to see only the direct line of (merge) ancestors from\n> patch to HEAD? Something like:\n> \n> commit 0cb583fd2862f19ea88b02eb307d11c09e51e2f8\n> Merge: 723e9db... a2d1056...\n> Author: Linus Torvalds <torvalds@linux-foundation.org>\n> Date:   Tue Sep 15 10:01:16 2009 -0700\n> \n> \tMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6\n> \n> commit 88512935a24305fea7aecc9ba4d675869e97fc2a\n> Merge: 8a62bab... 6b26dea...\n> Author: David S. Miller <davem@davemloft.net>\n> Date:   Fri Aug 14 12:27:19 2009 -0700\n> \n> \tMerge branch 'master' of\n> git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6\n> \n> commit edd7fc7003f31da48d06e215a93ea966a22c2a03\n> Author: Nick Kossifidis <mick@madwifi-project.org>\n> Date:   Mon Aug 10 03:29:02 2009 +0300\n> \n>      ath5k: Wakeup fixes\n> \n> \n> Here I can see exactly how the ath5k patch came to mainline and since\n> when it is there.\n\nI don't know whether --first-parent or --simplify-by-decoration, or\nperhaps --dense is what you want (you can also use --graph for better\nvisualization).\n\nOr use git-show-branch... :-)\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"123353","messageId":"4AB0FFE0.9040106@googlemail.com","threadId":"20971","inReplyTo":"m3vdjj2ceq.fsf@localhost.localdomain","subject":"Re: Direct ancestors from commit to HEAD","fromName":"Gonsolo","fromEmail":"gonsolo@gmail.com","sentAt":"2009-09-16T15:10:24Z","receivedAt":"2009-09-16T15:10:24Z","isPatch":false,"sender":{"key":"gonsolo@gmail.com","avatar":null},"body":"> I don't know whether --first-parent or --simplify-by-decoration, or\n> perhaps --dense is what you want (you can also use --graph for better\n> visualization).\n\nThank you. I think\n\ngit log --topo-order --dense --merges firstmerge..HEAD\n\ncomes very near. I still have to use \"git log --topo-order\", find the \ncommit of interest, and search upwards for the next merge that is used\nas firstmerge above.\nUnfortunately there are many merges in the net branch but it basically \ndoes the job.\n\nAn example:\n\n1. git log --topo-order, search for \"Wakeup fixes\" gives commit edd7fc.\n2. Search backward for \"^Merge\" gives commit a8519d.\n3. git log --topo-order --dense --merges edd7fc.., search for a8519d.\n4. A search backwards for Linus gives you the merge into mainline: d7e966.\n\nThis commit is basically what I wanted to know. Even nicer would be a \nthree-commit-line only consisting of the merge into wireless, the merge \ninto net and the merge into mainline.\n\n> Or use git-show-branch... :-)\n\nI don't think I can use that since I have only a master branch sitting \naround.\n"}]}