Subject: Re: [PATCH] gitk: Use git-difftool for external diffs

From: David Aguilar <[email-masked]>
Date: Fri, 20 Nov 2009 10:55:24 -0800

On Thu, Nov 19, 2009 at 11:53:37PM -0800, Junio C Hamano wrote:
> Paul Mackerras <[email-masked]> writes:
> 
> > I have no problem with using git difftool if the underlying git is new
> > enough, I just don't want gitk to explode when it isn't.
> 
> I somehow doubt there are many users who use pre 1.6.3 git but keep their
> gitk separately updated to very recent version, so personally I wouldn't
> worry too much about this.
> 
> > Also, I don't think we should remove the ability for the user to
> > choose which external diff tool to use.
> 
> This is a larger concern.  Does "difftool" allow use of an arbitrary tool
> like how gitk does (I have a suspicion that it is not as flexible)?

difftool supports arbitrary tools through configuration.
For arbitrary tools we set difftool.$name.cmd and
diff.tool = $name.

If gitk were to have a difftool paradigm then it might
be nice to have a text field mapped to the diff.tool variable.
The patch didn't address the diff.tool configuration variable
so that's a concern if we are to pursue difftool further.

The argument in favor of difftool is one of user
expectations.  From a user's POV it ~seems~ desirable for
gitk to honor difftool configurations.  The easiest way for
gitk to do that is to use git-difftool and not worry about
the details of how arbitrary tools are setup.

Later work could be done to provide UI for setting up
arbitrary tools inside of gitk.  My gut feeling
is that gitk isn't a git config editor.

This is why the difftool patch took the minimalist approach.
It trusts the user to have things configured to their
liking and trusts git-difftool to do the right thing
when no such configuration exists.

I think it's a question of whether this is something we'd
want to change.  It certainly doesn't bother me either way.

I might be the only person who'd notice such small details
so my vote-in-code is with my v2 $TMPDIR patch until someone
else thinks that using difftool inside of gitk is a good idea.

At which point I would probably pursue it with the minimalist
approach first and then gradually add UI for the pertinent
git config variables.

Just my .02,

-- 
		David