From: Junio C Hamano <junkio@cox.net>
To: "Bertrand Jacquin" <beber.mailing@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Howto get the merge-base ?
Date: Sun, 14 May 2006 11:12:32 -0700 [thread overview]
Message-ID: <7vu07s1nn3.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <4fb292fa0605141104j6c73c1eao5a8eeea9ad1b6282@mail.gmail.com> (Bertrand Jacquin's message of "Sun, 14 May 2006 20:04:45 +0200")
"Bertrand Jacquin" <beber.mailing@gmail.com> writes:
> On 5/14/06, Junio C Hamano <junkio@cox.net> wrote:
>> "Bertrand Jacquin" <beber.mailing@gmail.com> writes:
>>
>> > I'm trying to know which commit it the parent of a merge.
>> > For exemple if I do that :
>> >
>> > o Merge
>> > / \
>> > / \
>> > | |
>> > | o Commit D
>> > | |
>> > | o Commit C
>> > | |
>> > o | Commit B
>> > \ /
>> > \/
>> > o Commit A
>> > |
>> > o Init
>> >
> No, that's just on the following of git-send-mail-commit.sh thread (or
> something near). To make a readable merge mail with diffstat and
> summury.
For that you do not want merge-base. If your mainline was A-B
and you merged a side branch B-C-D with the merge, then to
people who tracked your head (that's the audience of "merge
mail", I presume) they just need to see:
git diff --stat M^1..M
git rev-list --no-merges --pretty M^1..M | git shortlog
The diffstat is "what damage was inflicted on the branch you
have been following with this merge", so the diff between the
trees before and after the merge is what you want. And the
rev-list piped to shortlog is to show "what commits were _not_
present on this branch before the merge, but are present after
the merge" (it could be spelled M^1..M^2 but the above would
handle octopus as well).
next prev parent reply other threads:[~2006-05-14 18:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-14 17:21 Howto get the merge-base ? Bertrand Jacquin
2006-05-14 17:44 ` Junio C Hamano
2006-05-14 18:04 ` Bertrand Jacquin
2006-05-14 18:12 ` Junio C Hamano [this message]
2006-05-14 18:40 ` Linus Torvalds
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=7vu07s1nn3.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=beber.mailing@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.