On Wed, Dec 31, 2008 at 8:04 AM, Matthieu Moy <Matthieu.Moy@xxxxxxx> wrote: > David Aguilar <davvid@xxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html