{"thread":{"id":"16866","subject":"git-difftool","startedAt":"2008-12-26T01:30:23Z","lastAt":"2009-01-17T14:17:29Z","messageCount":16,"participants":["David Aguilar","Matthieu Moy","Boyd Stephen Smith Jr.","Ping Yin","Markus Heidelberg","enso"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"98707","messageId":"20081226013021.GA15414@gmail.com","threadId":"16866","inReplyTo":null,"subject":"git-difftool","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2008-12-26T01:30:23Z","receivedAt":"2008-12-26T01:30:23Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Several co-workers have found this script useful.\nIt's basically git-mergetool modified to operate on the git\nindex/worktree.  There's some things about the script that\naren't very gitish (for example, the way revargs are\nprocessed) but it's useful nonetheless.\n\nThe usual use case for this script is when you have either\nstaged or unstaged changes and you'd like to see the changes\nin a side-by-side diff viewer (e.g. xxdiff, tkdiff, etc).\n\n\tgit difftool [<filename>*]\n\nAnother use case is when you'd like to see the same\ninformation but are comparing arbitrary commits\n(this is the part where the revarg parsing could be better)\n\n\tgit difftool --start=HEAD^ --end=HEAD [-- <filename>*]\n\nThe last use case is when you'd like to compare your current\nworktree to something other than HEAD (e.g. a tag)\n\n\tgit difftool --commit=v1.0.0 [-- <filename>*]\n\nIt's a generally useful script so I thought I'd share it here.\nIf others find it useful then maybe we can fix it up and ship\nit along with the other useful goodies in contrib/.\n\n\nenjoy,\n\n-- \n\n\tDavid\n\n\n"},{"id":"99066","messageId":"vpqhc4kz5zh.fsf@bauges.imag.fr","threadId":"16866","inReplyTo":"20081226013021.GA15414@gmail.com","subject":"Re: git-difftool","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2008-12-31T16:04:02Z","receivedAt":"2008-12-31T16:04:02Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"David Aguilar <davvid@gmail.com> writes:\n\n> The usual use case for this script is when you have either\n> staged or unstaged changes and you'd like to see the changes\n> in a side-by-side diff viewer (e.g. xxdiff, tkdiff, etc).\n>\n> \tgit difftool [<filename>*]\n\nIs it not a complex way of saying\n\n        GIT_EXTERNAL_DIFF=xxdiff git diff\n\n?\n\n(My 2 cents, and happy new year ;-)\n\n-- \nMatthieu\n"},{"id":"99071","messageId":"402731c90812311211p548c49d3p100f79ddee7163b0@mail.gmail.com","threadId":"16866","inReplyTo":"vpqhc4kz5zh.fsf@bauges.imag.fr","subject":"Re: git-difftool","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2008-12-31T20:11:07Z","receivedAt":"2008-12-31T20:11:07Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Wed, Dec 31, 2008 at 8:04 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n> David Aguilar <davvid@gmail.com> writes:\n>\n>> The usual use case for this script is when you have either\n>> staged or unstaged changes and you'd like to see the changes\n>> in a side-by-side diff viewer (e.g. xxdiff, tkdiff, etc).\n>>\n>>       git difftool [<filename>*]\n>\n> Is it not a complex way of saying\n>\n>        GIT_EXTERNAL_DIFF=xxdiff git diff\n>\n> ?\n>\n> (My 2 cents, and happy new year ;-)\n>\n> --\n> Matthieu\n>\n\nHmm... in theory, yes, but in practice, no.\nxxdiff is too gimp to handle what 'git diff' hands it =)\n\n\nFor example:\n\n$ GIT_EXTERNAL_DIFF=echo git diff test\ntest /tmp/.diff_1dh4TW 9daeafb9864cf43055ae93beb0afd6c7d144bfa4 100644 test 0000\n\n$ GIT_EXTERNAL_DIFF=xxdiff git diff test\nxxdiff (cmdline.cpp:762):\nYou can specify at most 3 filenames.\nExtra arguments: \" 100644 test 0000000000000000000000000000000000000000 100644\"\nUse 'xxdiff --help' for more information.\nexternal diff died, stopping at test.\n\n\nI checked the git-diff documentation and could not find a way to\ninhibit the sha1, mode, etc. args that are sent to GIT_EXTERNAL_DIFF\n(nor should there be, I presume).\n\nI'm all for finding the simplest way and GIT_EXTERNAL_DIFF seems like\nthe right entry point.  What I should do is change the script so that\nit handles all of the choosing-a-merge-tool-logic and just have git\ncall it via GIT_EXTERNAL_DIFF.  That would definitely simplify the\nscript since 'git diff' would be handling all of the tmp file and\noption processing logic.  wow, I really like that idea.  Thanks for\nthe tip!\n\n\nHappy new year,\n\n-- \n    David\n"},{"id":"99078","messageId":"200812311520.47999.bss@iguanasuicide.net","threadId":"16866","inReplyTo":"402731c90812311211p548c49d3p100f79ddee7163b0@mail.gmail.com","subject":"Re: git-difftool","fromName":"Boyd Stephen Smith Jr.","fromEmail":"bss@iguanasuicide.net","sentAt":"2008-12-31T21:20:47Z","receivedAt":"2008-12-31T21:20:47Z","isPatch":false,"sender":{"key":"bss@iguanasuicide.net","avatar":"https://gravatar.com/avatar/84b95eeff194b816c1568b1339e63e4b229825298664a9037b9f1ec713ead1e3?d=mp&s=160"},"body":"On Wednesday 2008 December 31 14:11:07 you wrote:\n> On Wed, Dec 31, 2008 at 8:04 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n> > David Aguilar <davvid@gmail.com> writes:\n> >> The usual use case for this script is when you have either\n> >> staged or unstaged changes and you'd like to see the changes\n> >> in a side-by-side diff viewer (e.g. xxdiff, tkdiff, etc).\n> >>\n> >>       git difftool [<filename>*]\n> >\n> > Is it not a complex way of saying\n> >\n> >        GIT_EXTERNAL_DIFF=xxdiff git diff\n> >\n> > ?\n>\n> Hmm... in theory, yes, but in practice, no.\n> xxdiff is too gimp to handle what 'git diff' hands it =)\n\nWhat about something like:\ngit diff | xxdiff -\n\nI normally use:\ngit diff | kompare -\n\nand it works fine.\n-- \nBoyd Stephen Smith Jr.                     ,= ,-_-. =. \nbss@iguanasuicide.net                     ((_/)o o(\\_))\nICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' \nhttp://iguanasuicide.net/                      \\_/     \n"},{"id":"99079","messageId":"46dff0320812312338i5a3ee0cem702a6b67ef76e48c@mail.gmail.com","threadId":"16866","inReplyTo":"vpqhc4kz5zh.fsf@bauges.imag.fr","subject":"Re: git-difftool","fromName":"Ping Yin","fromEmail":"pkufranky@gmail.com","sentAt":"2009-01-01T07:38:38Z","receivedAt":"2009-01-01T07:38:38Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"On Thu, Jan 1, 2009 at 12:04 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n> David Aguilar <davvid@gmail.com> writes:\n>\n>> The usual use case for this script is when you have either\n>> staged or unstaged changes and you'd like to see the changes\n>> in a side-by-side diff viewer (e.g. xxdiff, tkdiff, etc).\n>>\n>>       git difftool [<filename>*]\n>\n> Is it not a complex way of saying\n>\n>        GIT_EXTERNAL_DIFF=xxdiff git diff\n\n$ cat mydiff\n#!/bin/bash\nexec vimdiff $2 $5\n\nthen i run\n\n$ GIT_EXTERNAL_DIFF=mydiff  git diff\n\nbut it gives me the error\nVim: Warning: Output is not to a terminal\n\n$ ps -ef | grep vimdiff\nping     20284 20283  1 15:37 pts/13   00:00:00 vimdiff\n/tmp/.diff_XXXQK6 index.php\n"},{"id":"99091","messageId":"vpq8wpux61c.fsf@bauges.imag.fr","threadId":"16866","inReplyTo":"402731c90812311211p548c49d3p100f79ddee7163b0@mail.gmail.com","subject":"Re: git-difftool","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2009-01-01T17:58:07Z","receivedAt":"2009-01-01T17:58:07Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"\"David Aguilar\" <davvid@gmail.com> writes:\n\n> Hmm... in theory, yes, but in practice, no.\n> xxdiff is too gimp to handle what 'git diff' hands it =)\n\nAs done with \"vimdiff\" in another message, simply write a one-liner\nwrapper script that calls xxdiff $2 $3, and call this wrapper script.\n\n-- \nMatthieu\n"},{"id":"99132","messageId":"200901020104.01522.markus.heidelberg@web.de","threadId":"16866","inReplyTo":"46dff0320812312338i5a3ee0cem702a6b67ef76e48c@mail.gmail.com","subject":"Re: git-difftool","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-01-02T00:04:01Z","receivedAt":"2009-01-02T00:04:01Z","isPatch":false,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Ping Yin, 01.01.2009:\n> On Thu, Jan 1, 2009 at 12:04 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n> > David Aguilar <davvid@gmail.com> writes:\n> >\n> >> The usual use case for this script is when you have either\n> >> staged or unstaged changes and you'd like to see the changes\n> >> in a side-by-side diff viewer (e.g. xxdiff, tkdiff, etc).\n> >>\n> >>       git difftool [<filename>*]\n> >\n> > Is it not a complex way of saying\n> >\n> >        GIT_EXTERNAL_DIFF=xxdiff git diff\n> \n> $ cat mydiff\n> #!/bin/bash\n> exec vimdiff $2 $5\n> \n> then i run\n> \n> $ GIT_EXTERNAL_DIFF=mydiff  git diff\n> \n> but it gives me the error\n> Vim: Warning: Output is not to a terminal\n\nJust the warning and everything else works? For me the display is\ntotally screwed up and the commands don't really work because of the\npager. I have to add GIT_PAGER=\"\" to get it working.\n\nMarkus\n"},{"id":"99134","messageId":"200901020113.32082.markus.heidelberg@web.de","threadId":"16866","inReplyTo":"vpq8wpux61c.fsf@bauges.imag.fr","subject":"Re: git-difftool","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-01-02T00:13:31Z","receivedAt":"2009-01-02T00:13:31Z","isPatch":false,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Matthieu Moy, 01.01.2009:\n> \"David Aguilar\" <davvid@gmail.com> writes:\n> \n> > Hmm... in theory, yes, but in practice, no.\n> > xxdiff is too gimp to handle what 'git diff' hands it =)\n> \n> As done with \"vimdiff\" in another message, simply write a one-liner\n> wrapper script that calls xxdiff $2 $3, and call this wrapper script.\n\nThis works with GUI tools, but not with console tools. GVim works, Vim\ndoesn't.\nAnd invoking\n    git difftool\nis by far more convenient than\n    GIT_EXTERNAL_DIFF=vimdiff git diff\n\nMarkus\n"},{"id":"99141","messageId":"46dff0320901011759ke7026d9hafe4fdde099e370b@mail.gmail.com","threadId":"16866","inReplyTo":"200901020104.01522.markus.heidelberg@web.de","subject":"Re: git-difftool","fromName":"Ping Yin","fromEmail":"pkufranky@gmail.com","sentAt":"2009-01-02T01:59:37Z","receivedAt":"2009-01-02T01:59:37Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"On Fri, Jan 2, 2009 at 8:04 AM, Markus Heidelberg\n<markus.heidelberg@web.de> wrote:\n> Ping Yin, 01.01.2009:\n>> On Thu, Jan 1, 2009 at 12:04 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n>> > David Aguilar <davvid@gmail.com> writes:\n>> >\n>> >> The usual use case for this script is when you have either\n>> >> staged or unstaged changes and you'd like to see the changes\n>> >> in a side-by-side diff viewer (e.g. xxdiff, tkdiff, etc).\n>> >>\n>> >>       git difftool [<filename>*]\n>> >\n>> > Is it not a complex way of saying\n>> >\n>> >        GIT_EXTERNAL_DIFF=xxdiff git diff\n>>\n>> $ cat mydiff\n>> #!/bin/bash\n>> exec vimdiff $2 $5\n>>\n>> then i run\n>>\n>> $ GIT_EXTERNAL_DIFF=mydiff  git diff\n>>\n>> but it gives me the error\n>> Vim: Warning: Output is not to a terminal\n>\n> Just the warning and everything else works? For me the display is\n> totally screwed up and the commands don't really work because of the\n> pager. I have to add GIT_PAGER=\"\" to get it working.\n>\n\nThanks. With GIT_PAGER=\"\" it works now.\n"},{"id":"99171","messageId":"vpq63kxofi3.fsf@bauges.imag.fr","threadId":"16866","inReplyTo":"200901020113.32082.markus.heidelberg@web.de","subject":"Re: git-difftool","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2009-01-02T16:10:44Z","receivedAt":"2009-01-02T16:10:44Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Markus Heidelberg <markus.heidelberg@web.de> writes:\n\n> Matthieu Moy, 01.01.2009:\n>> \"David Aguilar\" <davvid@gmail.com> writes:\n>> \n>> > Hmm... in theory, yes, but in practice, no.\n>> > xxdiff is too gimp to handle what 'git diff' hands it =)\n>> \n>> As done with \"vimdiff\" in another message, simply write a one-liner\n>> wrapper script that calls xxdiff $2 $3, and call this wrapper script.\n>\n> This works with GUI tools, but not with console tools.\n\nActually, it does if you call git --no-pager.\n\n> GVim works, Vim\n> doesn't.\n> And invoking\n>     git difftool\n> is by far more convenient than\n>     GIT_EXTERNAL_DIFF=vimdiff git diff\n\nRight, but a script \"git-difftool\" calling the later is a one-liner,\nso 2 one-liners give you the same result as the ~500 lines script\nproposed. And GIT_EXTERNAL_DIFF has the great advantage of being\nmaintained together with git, and will most likely handle all cases\n(diff between index, working tree, arbitrary commit, ...) correctly.\n\n-- \nMatthieu\n"},{"id":"99175","messageId":"402731c90901020939k1a8ae795oc4cbfd0ced992aab@mail.gmail.com","threadId":"16866","inReplyTo":"vpq63kxofi3.fsf@bauges.imag.fr","subject":"Re: git-difftool","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-01-02T17:39:34Z","receivedAt":"2009-01-02T17:39:34Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Fri, Jan 2, 2009 at 8:10 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n>\n> As done with \"vimdiff\" in another message, simply write a\n> one-liner wrapper script that calls xxdiff $2 $3, and call this\n> wrapper script.\n>\n> ...\n>\n> Right, but a script \"git-difftool\" calling the later is a one-liner,\n> so 2 one-liners give you the same result as the ~500 lines script\n> proposed. And GIT_EXTERNAL_DIFF has the great advantage\n> of being maintained together with git, and will most likely handle\n> all cases (diff between index, working tree, arbitrary commit, ...)\n> correctly.\n>\n> --\n> Matthieu\n>\n\nThanks for the feedback.  I've done exactly what you suggested.\n\nI now have a git-difftool wrapper script that basically just sets up\nthe environment for git-difftool-helper.  git-difftool-helper does all\nof the merge tool configuration stuff ala\nhttp://www.kernel.org/pub/software/scm/git/docs/git-mergetool.html (it\nuses the same git config variables and thus works with existing custom\ncommands).  If you drop them both into the same directory it should\nwork as-is (it munges $PATH).\n\nIt's not a two-liner (they do all that git config stuff and handle\nmore than just vimdiff) but it does use GIT_EXTERNAL_DIFF now, which\nmakes the script infinitely more useful.  This is much nicer now since\nyou can pass any 'git diff' options to git-difftool and it'll handle\nit correctly.\n\nThe usage is simpler now too:\n\nusage: git difftool [--no-prompt] [--tool=tool] [\"git diff\" options]\n\n\nThanks for your help,\n\n-- \n    David\n"},{"id":"100666","messageId":"200901152326.47332.markus.heidelberg@web.de","threadId":"16866","inReplyTo":"402731c90901020939k1a8ae795oc4cbfd0ced992aab@mail.gmail.com","subject":"Re: git-difftool","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-01-15T22:26:46Z","receivedAt":"2009-01-15T22:26:46Z","isPatch":false,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"David Aguilar, 02.01.2009:\n> I now have a git-difftool wrapper script that basically just sets up\n> the environment for git-difftool-helper.  git-difftool-helper does all\n> of the merge tool configuration stuff ala\n> http://www.kernel.org/pub/software/scm/git/docs/git-mergetool.html (it\n> uses the same git config variables and thus works with existing custom\n> commands).  If you drop them both into the same directory it should\n> work as-is (it munges $PATH).\n> \n> It's not a two-liner (they do all that git config stuff and handle\n> more than just vimdiff) but it does use GIT_EXTERNAL_DIFF now, which\n> makes the script infinitely more useful.  This is much nicer now since\n> you can pass any 'git diff' options to git-difftool and it'll handle\n> it correctly.\n> \n> The usage is simpler now too:\n> \n> usage: git difftool [--no-prompt] [--tool=tool] [\"git diff\" options]\n\nNow isn't this something for contrib, David?\n\nMarkus\n"},{"id":"100700","messageId":"402731c90901152105q1880c5beod4146d955f04dd8b@mail.gmail.com","threadId":"16866","inReplyTo":"200901152326.47332.markus.heidelberg@web.de","subject":"Re: git-difftool","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-01-16T05:05:56Z","receivedAt":"2009-01-16T05:05:56Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Thu, Jan 15, 2009 at 2:26 PM, Markus Heidelberg\n<markus.heidelberg@web.de> wrote:\n> David Aguilar, 02.01.2009:\n>> I now have a git-difftool wrapper script that basically just sets up\n>> the environment for git-difftool-helper.  git-difftool-helper does all\n>> of the merge tool configuration stuff ala\n>> http://www.kernel.org/pub/software/scm/git/docs/git-mergetool.html (it\n>> uses the same git config variables and thus works with existing custom\n>> commands).  If you drop them both into the same directory it should\n>> work as-is (it munges $PATH).\n>>\n>> It's not a two-liner (they do all that git config stuff and handle\n>> more than just vimdiff) but it does use GIT_EXTERNAL_DIFF now, which\n>> makes the script infinitely more useful.  This is much nicer now since\n>> you can pass any 'git diff' options to git-difftool and it'll handle\n>> it correctly.\n>>\n>> The usage is simpler now too:\n>>\n>> usage: git difftool [--no-prompt] [--tool=tool] [\"git diff\" options]\n>\n> Now isn't this something for contrib, David?\n>\n> Markus\n>\n>\n\nIt sure is.\n\nBTW the script worked beautifully on *nix.\n\nI later decided to give it a try on Windows and of course it didn't\nwork right the first time.  Once I added a check to use \"git.exe\"\ninstead of \"git\" then it started working again.  I'll prepare some\ndocumentation and post a patch later tonight.\n\nThanks for reminding me,\n\n-- \n    David\n\n\n(p.s. Markus: sorry for the double-email -- I forgot to cc: the list)\n"},{"id":"100801","messageId":"1232164040173-2171934.post@n2.nabble.com","threadId":"16866","inReplyTo":"46dff0320901011759ke7026d9hafe4fdde099e370b@mail.gmail.com","subject":"Re: git-difftool","fromName":"enso","fromEmail":"a.calhoon@gmail.com","sentAt":"2009-01-17T03:47:20Z","receivedAt":"2009-01-17T03:47:20Z","isPatch":false,"sender":{"key":"a.calhoon@gmail.com","avatar":null},"body":"\n\n\nPing Yin wrote:\n> \n> Thanks. With GIT_PAGER=\"\" it works now.\n> \n\nPersonally, I didn't like having to screw around with environment variables\ndirectly to get vimdiff to work. So I did the following:\n\n1) Made a simple diff script gitvimdiff.sh:\n\n#!/bin/env sh\nvimdiff \"$2\" \"$5\"\n\n2) git config --global diff.external ~/path/to/gitvimdiff.sh\n3) git config --global pager.diff \"\"\n\nNow when I run git-diff it uses vimdiff (hooray) and automatically turns the\npager off for me! Now only if I could get meld to work under cygwin.\n-- \nView this message in context: http://n2.nabble.com/git-difftool-tp1814817p2171934.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"100802","messageId":"402731c90901162041w2437587bsae1e6dde9384a4b3@mail.gmail.com","threadId":"16866","inReplyTo":"1232164040173-2171934.post@n2.nabble.com","subject":"Re: git-difftool","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-01-17T04:41:49Z","receivedAt":"2009-01-17T04:41:49Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Fri, Jan 16, 2009 at 7:47 PM, enso <a.calhoon@gmail.com> wrote:\n> Ping Yin wrote:\n>>\n>> Thanks. With GIT_PAGER=\"\" it works now.\n>>\n>\n> Personally, I didn't like having to screw around with environment variables\n> directly to get vimdiff to work. So I did the following:\n>\n> 1) Made a simple diff script gitvimdiff.sh:\n>\n> #!/bin/env sh\n> vimdiff \"$2\" \"$5\"\n>\n> 2) git config --global diff.external ~/path/to/gitvimdiff.sh\n> 3) git config --global pager.diff \"\"\n>\n> Now when I run git-diff it uses vimdiff (hooray) and automatically turns the\n> pager off for me! Now only if I could get meld to work under cygwin.\n> --\n\nHello sir\nIt sounds like you were looking for exactly the patch I sent last night =)\n\nhttp://article.gmane.org/gmane.comp.version-control.git/105925\n\n\nWith 'git difftool' you just do it once:\n\ngit config --global merge.tool vimdiff\ngit difftool [diff options]\n\nThe nice thing is that it supports the same configuration variables as\n'git mergetool', so if you've already set things up to work correctly\nwith mergetool then you're already setup for difftool.\n\nMeld.. I can't say I've used it on windows.\nI have successfully used kdiff3 with msysgit, though.  I just\ndownloaded it and copied it to /bin.\n\ndifftool supports meld, though, so if you get a build of meld that\nworks then you should in theory be able to use it just by setting\nmerge.tool to meld.\n\n-- \n    David\n"},{"id":"100829","messageId":"46dff0320901170617w620015cy2d155dc839dbdaf5@mail.gmail.com","threadId":"16866","inReplyTo":"1232164040173-2171934.post@n2.nabble.com","subject":"Re: git-difftool","fromName":"Ping Yin","fromEmail":"pkufranky@gmail.com","sentAt":"2009-01-17T14:17:29Z","receivedAt":"2009-01-17T14:17:29Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"On Sat, Jan 17, 2009 at 11:47 AM, enso <a.calhoon@gmail.com> wrote:\n>\n>\n>\n> Ping Yin wrote:\n>>\n>> Thanks. With GIT_PAGER=\"\" it works now.\n>>\n>\n> Personally, I didn't like having to screw around with environment variables\n> directly to get vimdiff to work. So I did the following:\n>\n> 1) Made a simple diff script gitvimdiff.sh:\n>\n> #!/bin/env sh\n> vimdiff \"$2\" \"$5\"\n>\n> 2) git config --global diff.external ~/path/to/gitvimdiff.sh\n> 3) git config --global pager.diff \"\"\n>\n\nI am not aware of these configurations, thanks.\n\nWhat i current do is to use an alias to use vimdiff for diff\n"}]}