From: Stephen Bash <bash@genarts.com>
To: Michele Ballabio <barra_cuda@katamail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: git log for a merged branch
Date: Mon, 13 Sep 2010 09:37:58 -0400 (EDT) [thread overview]
Message-ID: <30770696.248360.1284385078695.JavaMail.root@mail.hq.genarts.com> (raw)
In-Reply-To: <201009090117.06555.barra_cuda@katamail.com>
----- Original Message -----
> From: "Michele Ballabio" <barra_cuda@katamail.com>
> To: "Stephen Bash" <bash@genarts.com>
> Cc: "Git Mailing List" <git@vger.kernel.org>
> Sent: Wednesday, September 8, 2010 7:17:05 PM
> Subject: Re: git log for a merged branch
> On Wednesday 08 September 2010, Stephen Bash wrote:
>
> Let's call the merge commit "mergecmt". The commit where the "release"
> branch
> branched off is
>
> git merge-base mergecmt^1 mergecmt^2
>
> ... where mergecmt^1 is the first parent of the merge (usually on the
> "mainline" branch) and mergecmt^2 is the second parent, which
> usually(*)
> refers to the "release" branch (in this case, tagFoo).
>
> So
>
> git log $(git merge-base mergecmt^1 mergecmt^2)..mergecmt^2
>
> is what you want.
>
> > To complicate things a bit more, in the real world there may be
> > multiple
> > merges from the release branch to mainline during the life of the
> > release
> > branch, so any solution that also deals with that would be
> > outstanding
> > (probably at the cost of additional complexity?)
>
> Maybe something like:
>
> for i in $(git rev-list --merges last_interesting_tag..mainline)
> do
> git log $(git merge-base $i^1 $i^2)..$i^2
> done
Hm... Makes sense... I'll have to play with it a little bit to get a good feel for how it fits our workflow, but it seems like a really good option.
Thanks!
Stephen
next prev parent reply other threads:[~2010-09-13 13:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <22744209.230141.1283954076245.JavaMail.root@mail.hq.genarts.com>
2010-09-08 14:04 ` git log for a merged branch Stephen Bash
2010-09-08 14:23 ` Tor Arntsen
2010-09-08 15:22 ` Stephen Bash
2010-09-08 23:17 ` Michele Ballabio
2010-09-13 13:37 ` Stephen Bash [this message]
2010-09-13 14:00 ` Santi Béjar
2010-09-13 14:13 ` Stephen Bash
2010-09-13 14:43 ` Santi Béjar
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30770696.248360.1284385078695.JavaMail.root@mail.hq.genarts.com \
--to=bash@genarts.com \
--cc=barra_cuda@katamail.com \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).