git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Aguilar" <davvid@gmail.com>
To: "Matthieu Moy" <Matthieu.Moy@imag.fr>
Cc: git@vger.kernel.org
Subject: Re: git-difftool
Date: Wed, 31 Dec 2008 12:11:07 -0800	[thread overview]
Message-ID: <402731c90812311211p548c49d3p100f79ddee7163b0@mail.gmail.com> (raw)
In-Reply-To: <vpqhc4kz5zh.fsf@bauges.imag.fr>

On Wed, Dec 31, 2008 at 8:04 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
> David Aguilar <davvid@gmail.com> writes:
>
>> The usual use case for this script is when you have either
>> staged or unstaged changes and you'd like to see the changes
>> in a side-by-side diff viewer (e.g. xxdiff, tkdiff, etc).
>>
>>       git difftool [<filename>*]
>
> Is it not a complex way of saying
>
>        GIT_EXTERNAL_DIFF=xxdiff git diff
>
> ?
>
> (My 2 cents, and happy new year ;-)
>
> --
> Matthieu
>

Hmm... in theory, yes, but in practice, no.
xxdiff is too gimp to handle what 'git diff' hands it =)


For example:

$ GIT_EXTERNAL_DIFF=echo git diff test
test /tmp/.diff_1dh4TW 9daeafb9864cf43055ae93beb0afd6c7d144bfa4 100644 test 0000

$ GIT_EXTERNAL_DIFF=xxdiff git diff test
xxdiff (cmdline.cpp:762):
You can specify at most 3 filenames.
Extra arguments: " 100644 test 0000000000000000000000000000000000000000 100644"
Use 'xxdiff --help' for more information.
external diff died, stopping at test.


I checked the git-diff documentation and could not find a way to
inhibit the sha1, mode, etc. args that are sent to GIT_EXTERNAL_DIFF
(nor should there be, I presume).

I'm all for finding the simplest way and GIT_EXTERNAL_DIFF seems like
the right entry point.  What I should do is change the script so that
it handles all of the choosing-a-merge-tool-logic and just have git
call it via GIT_EXTERNAL_DIFF.  That would definitely simplify the
script since 'git diff' would be handling all of the tmp file and
option processing logic.  wow, I really like that idea.  Thanks for
the tip!


Happy new year,

-- 
    David

  reply	other threads:[~2008-12-31 20:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-26  1:30 git-difftool David Aguilar
2008-12-31 16:04 ` git-difftool Matthieu Moy
2008-12-31 20:11   ` David Aguilar [this message]
2008-12-31 21:20     ` git-difftool Boyd Stephen Smith Jr.
2009-01-01 17:58     ` git-difftool Matthieu Moy
2009-01-02  0:13       ` git-difftool Markus Heidelberg
2009-01-02 16:10         ` git-difftool Matthieu Moy
2009-01-02 17:39           ` git-difftool David Aguilar
2009-01-15 22:26             ` git-difftool Markus Heidelberg
2009-01-16  5:05               ` git-difftool David Aguilar
2009-01-01  7:38   ` git-difftool Ping Yin
2009-01-02  0:04     ` git-difftool Markus Heidelberg
2009-01-02  1:59       ` git-difftool Ping Yin
2009-01-17  3:47         ` git-difftool enso
2009-01-17  4:41           ` git-difftool David Aguilar
2009-01-17 14:17           ` git-difftool Ping Yin

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=402731c90812311211p548c49d3p100f79ddee7163b0@mail.gmail.com \
    --to=davvid@gmail.com \
    --cc=Matthieu.Moy@imag.fr \
    --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).