From: Junio C Hamano <gitster@pobox.com>
To: Petr Baudis <pasky@suse.cz>
Cc: Christian MICHON <christian.michon@gmail.com>,
git list <git@vger.kernel.org>
Subject: Re: What should I do to display the diff of even a simple merge commit?
Date: Tue, 09 Feb 2010 16:05:50 -0800 [thread overview]
Message-ID: <7v1vguuf8h.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20100209235707.GQ9553@machine.or.cz> (Petr Baudis's message of "Wed\, 10 Feb 2010 00\:57\:07 +0100")
Petr Baudis <pasky@suse.cz> writes:
> I'm not sure if there is any clever switch for this, but I usually
> just use one of
>
> git diff mergecommit^1 mergecommit
> git diff mergecommit^2 mergecommit
>
> depending on which parent I want the diff against. If you always do your
> merges as "on mainline, merging in a topic" without fast-forwarding,
> diff against the first parent will be probably the right one and you can
> simply use:
>
> git diff mergecommit^ mergecommit
Frankly, we should make "git log --first-parent -p" DTRT, I think.
The attitude towards merges we maintain officially is "all parents are
equal", but in practice, there often are cases where --first-parent
traversal makes a lot more sense when browsing the history (especially
"the official" one). The use of that option should be a clear enough sign
that diff between the first parent and the merge result is asked for.
next prev parent reply other threads:[~2010-02-10 0:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-09 23:45 What should I do to display the diff of even a simple merge commit? Christian MICHON
2010-02-09 23:46 ` Christian MICHON
2010-02-09 23:57 ` Petr Baudis
2010-02-10 0:05 ` Junio C Hamano [this message]
2010-02-10 1:11 ` [PATCH] git log -p -m: Document, honor --first-parent Petr Baudis
2010-02-10 1:30 ` Junio C Hamano
2010-02-10 2:12 ` Petr Baudis
2010-02-10 3:23 ` Junio C Hamano
2010-02-10 0:07 ` What should I do to display the diff of even a simple merge commit? Christian MICHON
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=7v1vguuf8h.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=christian.michon@gmail.com \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
/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.