git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: Duy Nguyen <pclouds@gmail.com>,
	Stefan Beller <sbeller@google.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Find a topic branch containing a commit
Date: Thu, 28 Jul 2016 08:11:27 -0700	[thread overview]
Message-ID: <xmqqa8h1u7a8.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <a7cd0ee3-8281-b220-1acc-c9516325ecde@alum.mit.edu> (Michael Haggerty's message of "Thu, 28 Jul 2016 15:46:08 +0200")

Michael Haggerty <mhagger@alum.mit.edu> writes:

> On 07/27/2016 08:03 PM, Duy Nguyen wrote:
>>>
>>> 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!

It would be nice to have a mode to give the result in a more human
readable way.

I use when-merged to find where to queue a follow-on fix to a topic
that has already graduated to 'master'.  When the patch fixes an
earlier mistake of the commit X, "git when-merged X master" gives me
the merge's 40-hex object name, and the next step is almost always
to pass it to "git describe [--contains]".  This tells me down to
which maintenace track the fix can go.

Of course I can get that information by running a separate "git
describe [--contains] X", but when I'll be running "when-merged"
anyway, it is a wasted step.

Then "git show" of the found merge tells me where the tip of the
topic is and what the topic was called (older topic branches are
culled sometime after they are merged to 'master' and relevant
maintenance tracks), and allows me to queue the patch to the correct
place (after re-creating the topic if necessary).


    

      reply	other threads:[~2016-07-28 15:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27 17:42 Find a topic branch containing a commit Duy Nguyen
2016-07-27 17:50 ` Stefan Beller
2016-07-27 18:02   ` Stefan Beller
2016-07-27 18:07     ` Duy Nguyen
2016-07-27 18:03   ` Duy Nguyen
2016-07-28 13:46     ` Michael Haggerty
2016-07-28 15:11       ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqa8h1u7a8.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    --cc=pclouds@gmail.com \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).