Subject: Re: [PATCH] gitk: Add ability to define an alternate temporary directory

From: David Aguilar <[email-masked]>
Date: Wed, 11 Nov 2009 08:44:53 -0800

On Tue, Nov 10, 2009 at 08:42:35PM -0800, Junio C Hamano wrote:
> David Aguilar <[email-masked]> writes:
> 
> > That said, if there's a consensus that the path doesn't matter
> > much than we could change the behavior.  I was just trying to be
> > careful.
> 
> If we are not honoring GITK_TMPDIR and suddenly start paying attention to
> it, that already is a change in behaviour.  Why is it better than paying
> attention to TMPDIR?

True.

> But why does gitk, which is primarily a read-only history browsing tool
> (yes, I know it can do "checkout" and stuff), needs to write anything to
> anywhere in the first place?

It happens when you click on a commit, right-click on a file
and then choose "external diff".

gitk writes file@commit and file@commit^ to temporary files
and diffs them using an external diff tool.

Shall I reroll with s/GITK_TMPDIR/TMPDIR/ ?

gitk was written before git-difftool existed.
A higher impact change would be to change gitk to use
git-difftool instead of managing its own temporary files.

If we're looking for the ideal solution than that is
probably it.  The only downside is that gitk would stop
working with git versions < 1.6.3.  That doesn't seem like
a real issue, though, because gitk is bundled with git.

Thoughts?

-- 
		David