From: Jeff King <peff@peff.net>
To: Jeremy Ramer <jdramer@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: merge conflict diff
Date: Thu, 3 Apr 2008 10:26:49 -0400 [thread overview]
Message-ID: <20080403142649.GA16699@coredump.intra.peff.net> (raw)
In-Reply-To: <b9fd99020804030713n3c1a2602t847e8a132f8ccd06@mail.gmail.com>
On Thu, Apr 03, 2008 at 08:13:04AM -0600, Jeremy Ramer wrote:
> I am trying to figure out how to quickly diff two source files that
> led to a merge conflict. When a conflict occurs the command
> [...]
> So far I am thinking of
> # git checkout-index --stage=2 --temp foo
> # git checkout-index --stage=3 --temp foo
> # git diff .merge_x1 .merge_x2
The special ref syntax :<n>:file refers to the blob in stage <n> of the
index. So you can see them with:
git show :2:foo
git show :3:foo
Or diff them with:
git diff :2:foo :3:foo
You may also want to look at the git-mergetool script, which uses both
versions (along with the ancestor) as the arguments to many common merge
resolution programs.
-Peff
next prev parent reply other threads:[~2008-04-03 14:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-03 14:13 merge conflict diff Jeremy Ramer
2008-04-03 14:26 ` Jeff King [this message]
2008-04-03 14:58 ` Jeremy Ramer
2008-04-03 16:48 ` Matthieu Moy
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=20080403142649.GA16699@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=jdramer@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.
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).