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

Re: use GIT_DIR instead of /var/tmp

From
Linus Torvalds <torvalds@osdl.org>
Date
Jan 5, 2006, 16:42 UTC
Message-ID
<Pine.LNX.4.64.0601050840010.3169@g5.osdl.org>
In-Reply-To
<81b0412b0601050352n386505bfjd40e515809e3c862@mail.gmail.com>
On Thu, 5 Jan 2006, Alex Riesen wrote:
>
> Not every system (will not one microsoft windows system) have /var/tmp,
> whereas using GIT_DIR for random temporary files is more or less established.

Note that in this case it might be appropriate, but in general you should be careful. You may want to access a git directory without actually having write permissions to it.

Of course, for "git reset" that's not an issue (since it needs write permissions anyway), but just in general.. git programs mostly use pipes to communicate, and temporary files are pretty rare, so we hopefully don't have that issue much, but let's make sure that things that just look at a repository can work even with a read-only repo.

		Linus
Previous: H. Peter AnvinNext: Jon Nelson
Message 5 of 8 in “use GIT_DIR instead of /var/tmp”
  1. Alex RiesenJan 5, 2006
  2. H. Peter AnvinJan 5, 2006
  3. Alex RiesenJan 5, 2006
  4. H. Peter AnvinJan 5, 2006
  5. Linus TorvaldsJan 5, 2006
  6. Jon NelsonJan 5, 2006
  7. Alex RiesenJan 6, 2006
  8. Johannes SchindelinJan 6, 2006

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.