From: "Øystein Walle" <oystwa@gmail.com>
To: git@vger.kernel.org
Subject: Suggestion for difftool behaviour during a merge conflict
Date: Wed, 13 Mar 2013 19:48:59 +0100 [thread overview]
Message-ID: <CAFaJEqu8gHSLK5u7v5ZOaJ1XjAhV=F9p46MEo2sDVH4vpXAojA@mail.gmail.com> (raw)
When a merge is ongoing and there are conflicts, 'git difftool' will
output the exact same --cc-style diff output as 'git diff' will without
further explanation. This has lead to some confusion: A couple of weeks
ago a person asked on #git why his difftool wasn't working. After a long
while we realized difftool's behaviour after invocations such as 'git
difftool HEAD~ HEAD' would work as expected but 'git difftool' "simply
wouldn't".
With that in mind I have three suggestions on improving 'git difftool':
- Show a three-way diff between the versions (local, remote, merge)
using the user's configured difftool. Diffing against the version
containing the markers will generate some extra noise in the difftool
and might be confusing, but it's similar in behaviour to how 'git
difftool' normally works.
- Prompt the user if they want to launch 'git mergetool' instead since
a merge is ongoing. Reasonable but it might be awkward if the user is
asked whether the conflict was resolved or not when all they wanted
to do was to visually diff something.
- Add a notice to stderr saying that a --cc-style diff output is shown
instead; or document the behaviour in the man page. Definitely the
simplest option.
I'm willing to try to take a stab at either of these but I wanted to
bring it up first. There is of course an implicit fourth option which is
to do nothing, and that I'm wrong about this :)
Best regards,
Øystein Walle
next reply other threads:[~2013-03-13 18:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 18:48 Øystein Walle [this message]
2013-03-13 22:26 ` Suggestion for difftool behaviour during a merge conflict David Aguilar
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='CAFaJEqu8gHSLK5u7v5ZOaJ1XjAhV=F9p46MEo2sDVH4vpXAojA@mail.gmail.com' \
--to=oystwa@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 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).