Find a topic branch containing a commit

6 messages, 3 authors, 2016-07-28 · open the first message on its own page

Find a topic branch containing a commit

From: Duy Nguyen <hidden>
Date: 2016-07-27 17:43:09

Before I start doing anything silly because I don't know it can
already be done without waving my C wand like a mad man...

I often do this: find a commit of interest, the commit itself is not
enough so I need a full patch series to figure out what's going, so I
fire up "git log --graph --oneline" and manually search that commit
and trace back to the merge point, then I can "git log --patch". Is
there an automatic way to accomplish that? Something like "git branch
--contains" (or "git merge --contains")?

PS. Sometimes I wish we could optionally save cover letter in the
merge commit. Sometimes the "big plan" is hard to see by reading
individual commit messages.
-- 
Duy

Re: Find a topic branch containing a commit

From: Stefan Beller <hidden>
Date: 2016-07-27 17:50:22

On Wed, Jul 27, 2016 at 10:42 AM, Duy Nguyen [off-list ref] wrote:
Before I start doing anything silly because I don't know it can
already be done without waving my C wand like a mad man...

I often do this: find a commit of interest, the commit itself is not
enough so I need a full patch series to figure out what's going, so I
fire up "git log --graph --oneline" and manually search that commit
and trace back to the merge point, then I can "git log --patch". Is
there an automatic way to accomplish that? Something like "git branch
--contains" (or "git merge --contains")?
https://github.com/mhagger/git-when-merged ?
PS. Sometimes I wish we could optionally save cover letter in the
merge commit. Sometimes the "big plan" is hard to see by reading
individual commit messages.
--
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: Find a topic branch containing a commit

From: Stefan Beller <hidden>
Date: 2016-07-27 18:02:53

On Wed, Jul 27, 2016 at 10:50 AM, Stefan Beller [off-list ref] wrote:
quoted
PS. Sometimes I wish we could optionally save cover letter in the
merge commit. Sometimes the "big plan" is hard to see by reading
individual commit messages.
--
I had this wish, too. That makes a lot of sense for merge commits,
although it doesn't work well with our current workflow I would presume,
because the merge commit happens at a different time than when Junio
picks up a patch series. And in the mean time, where would we
store the cover letter information to not get lost?

Note there are some external recordings instead of adding
it to the history itself, e.g. https://github.com/trast/git/tree/notes/gmane
annotated each commit with pointers to the mailing list archive.

Re: Find a topic branch containing a commit

From: Duy Nguyen <hidden>
Date: 2016-07-27 18:03:49

On Wed, Jul 27, 2016 at 7:50 PM, Stefan Beller [off-list ref] wrote:
On Wed, Jul 27, 2016 at 10:42 AM, Duy Nguyen [off-list ref] wrote:
quoted
Before I start doing anything silly because I don't know it can
already be done without waving my C wand like a mad man...

I often do this: find a commit of interest, the commit itself is not
enough so I need a full patch series to figure out what's going, so I
fire up "git log --graph --oneline" and manually search that commit
and trace back to the merge point, then I can "git log --patch". Is
there an automatic way to accomplish that? Something like "git branch
--contains" (or "git merge --contains")?
https://github.com/mhagger/git-when-merged ?
Beautiful. If it had an option to show a topic (i.e. git-log from
merge base to merge point) I would be ecstatic. Michael, any plans on
bringing this in C Git? For many topic-based projects this would be
very helpful addition, and I think it's not so hard to do it in C
either.
-- 
Duy

Re: Find a topic branch containing a commit

From: Duy Nguyen <hidden>
Date: 2016-07-27 18:08:04

On Wed, Jul 27, 2016 at 8:02 PM, Stefan Beller [off-list ref] wrote:
On Wed, Jul 27, 2016 at 10:50 AM, Stefan Beller [off-list ref] wrote:
quoted
quoted
PS. Sometimes I wish we could optionally save cover letter in the
merge commit. Sometimes the "big plan" is hard to see by reading
individual commit messages.
--
I had this wish, too. That makes a lot of sense for merge commits,
although it doesn't work well with our current workflow I would presume,
because the merge commit happens at a different time than when Junio
picks up a patch series. And in the mean time, where would we
store the cover letter information to not get lost?
We have config branch.xxx.description for that. If we teach git-am to
pick up (a selected portion of) the cover letter and save it in
branch.xxx.description (or even a new key like branch.xxx.mergeMsg)
then nothing is lost.
-- 
Duy

Re: Find a topic branch containing a commit

From: Michael Haggerty <hidden>
Date: 2016-07-28 13:46:36

On 07/27/2016 08:03 PM, Duy Nguyen wrote:
On Wed, Jul 27, 2016 at 7:50 PM, Stefan Beller [off-list ref] wrote:
quoted
On Wed, Jul 27, 2016 at 10:42 AM, Duy Nguyen [off-list ref] wrote:
quoted
Before I start doing anything silly because I don't know it can
already be done without waving my C wand like a mad man...

I often do this: find a commit of interest, the commit itself is not
enough so I need a full patch series to figure out what's going, so I
fire up "git log --graph --oneline" and manually search that commit
and trace back to the merge point, then I can "git log --patch". Is
there an automatic way to accomplish that? Something like "git branch
--contains" (or "git merge --contains")?
https://github.com/mhagger/git-when-merged ?
Beautiful. If it had an option to show a topic (i.e. git-log from
merge base to merge point) I would be ecstatic.
That's a good idea. I just created a pull request to add that feature:

    https://github.com/mhagger/git-when-merged/pull/13

Let me know what you think!
Michael, any plans on
bringing this in C Git? For many topic-based projects this would be
very helpful addition, and I think it's not so hard to do it in C
either.
I had no such plans, and I don't have time to work on that now. But I
certainly don't object if somebody else wants to work on it. It might
make a nice GSoC-sized project (though I'm not volunteering to be a
mentor at this time :-P ).

Michael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help