From: Michael J Gruber <git@drmicha.warpmail.net>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: Not possible to see combined diff before committing a merge?
Date: Thu, 18 Mar 2010 10:55:12 +0100 [thread overview]
Message-ID: <4BA1F880.2090100@drmicha.warpmail.net> (raw)
In-Reply-To: <76718491003172321j2a184643o47ec3a712a3b0c12@mail.gmail.com>
Jay Soffian venit, vidit, dixit 18.03.2010 07:21:
> Am I missing something, or is there no way to see combined diff output
> after completing merge resolution on a conflicted merge but before
> committing the merge?
>
> $ git diff --cc [-- path]
>
> works fine _until_ you've added the file to the index, at which point
> you're hosed.
>
> I think I want the combined diff between:
>
> - What's in the index
> - The first parent (ORIG_HEAD)
> - The second parent (MERGE_HEAD)
>
> And I don't think that's possible, sadly.
The obvious attempt "git diff --cc --cached" does not work,
unfortunately, because the add cleared out the other stages from the index.
The funny thing is that after committing, git show will give you the
combined diff (again).
I guess that proves, again, that there can't be a symbolic ref like
INDEX because it just doesn't behave like one.
If there are no conflicted files left you could do a throw-away commit
with a temp index, but that looks ugly. Do we have a way of specifying a
3-way diff for some git diff --cc incarnation, i.e. pretending two
commits to be the parents and a third (or index) to be the merge result?
Junio would probably say that by adding the merge resolution you declare
that you're not interested in that part of the merge any more ;)
Michael
next prev parent reply other threads:[~2010-03-18 9:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 6:21 Not possible to see combined diff before committing a merge? Jay Soffian
2010-03-18 9:55 ` Michael J Gruber [this message]
2010-03-18 15:21 ` Jay Soffian
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=4BA1F880.2090100@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=jaysoffian@gmail.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.
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).