git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
David Aguilar <davvid@gmail.com>
Date
Nov 11, 2009, 16:44 UTC
Message-ID
<20091111164451.GA45475@gmail.com>
In-Reply-To
<7vr5s5y8n8.fsf@alter.siamese.dyndns.org>
On Tue, Nov 10, 2009 at 08:42:35PM -0800, Junio C Hamano wrote:
Show 9 quoted lines
> David Aguilar <davvid@gmail.com> 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
Previous: Junio C HamanoNext: Jeff King
Message 6 of 9 in “gitk: Add ability to define an alternate temporary directory”
  1. gitk: Add ability to define an alternate temporary directoryDavid Aguilar, Nov 11, 2009
  2. gitk: Document the $GITK_TMPDIR variableDavid Aguilar, Nov 11, 2009
  3. Sam VilainNov 11, 2009
  4. David AguilarNov 11, 2009
  5. Junio C HamanoNov 11, 2009
  6. David AguilarNov 11, 2009
  7. Jeff KingNov 12, 2009
  8. David AguilarNov 12, 2009
  9. Jeff KingNov 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.