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

From: David Aguilar <[email-masked]>
Date: Thu, 19 Nov 2009 11:39:15 -0800

On Thu, Nov 19, 2009 at 08:03:31PM +1100, Paul Mackerras wrote:
> David Aguilar writes:
> 
> > This teaches gitk about git-difftool.  A benefit of this change is
> > that gitk's external diff now works with read-only repositories.
> 
> What version of git does git difftool first appear in?  I prefer not
> to introduce hard requirements on very recent versions of git into
> gitk.
> 
> Paul.

git-difftool appeared in git 1.6.3.

If this patch is not going in then how do you suggest we fix the
read-only repository bug?

My immediate thought is to harden the $TMPDIR patch so that the
filenames used by gitk are much less predictable (I bailed on it
once Peff noted the $TMPDIR vulnerabilities and used
git-difftool instead since it is known to be safe).

Does hardening the $TMPDIR patch have a better chance of
being accepted?

In defense of difftool: there are more benefits to using
git-difftool than just read-only repositories.
The current external diff code does not work if 'meld'
is not installed whereas using git-difftool works by default
in more environments.  It also makes things match users'
expectations when they have already gone through the trouble
of configuring a diff or merge tool.

Is there a particular time frame in which such a patch could go
in?

My primary concern is getting gitk to work with read-only
repositories.  git-difftool was just one way of getting there.
If keeping backwards compatibility is a must-have then I can
hold onto the git-difftool patch until some time in the future
when it is more appropriate.  Hopefully something along the
lines of a hardened $TMPDIR patch can stand in for the final
fix in the meantime.

What do you think?

-- 
		David