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

Why /var/cache/git?

From
Bron Gondwana <brong@fastmail.fm>
Date
Oct 25, 2010, 10:30 UTC
Message-ID
<20101025103006.GA18782@brong.net>
(resent - correct address for git list!)
(Gerrit: you're CC'd as the attribution in README.Debian
 which in the one place I can see /var/cache/git mentioned
 in the docs - without a justification for why it was
 chosen...)

I'm setting up shared repositories on a machine, and I notice all the examples I can find on the web, and also the auto-created directory from the packages are /var/cache/git/

So I looked at the FHS, because that seemed odd to me:
http://www.pathname.com/fhs/pub/fhs-2.3.html#VARCACHEAPPLICATIONCACHEDATA
    /var/cache is intended for cached data from applications.
    Such data is locally generated as a result of time-consuming
    I/O or calculation. The application must be able to regenerate
    or restore the data. Unlike /var/spool, the cached files can
    be deleted without data loss.

I guess in theory, someone else has all those commits in their local git repository somewhere. Still, it feels to me that /var/lib/git is the correct location. Is there any reason why /var/spool/git was chosen?

(I'm running Debian Lenny with the 1.7.1 backport packages, but I see examples from Fedora with the same paths as well)

Bron.
Next: J.H.
Message 1 of 9 in “Why /var/cache/git?”
  1. Bron GondwanaOct 25, 2010
  2. J.H.Oct 25, 2010
  3. Bron GondwanaOct 26, 2010
  4. Drew NorthupOct 26, 2010
  5. Gerrit PapeOct 26, 2010
  6. Jakub NarebskiOct 26, 2010
  7. Junio C HamanoOct 26, 2010
  8. Gerrit PapeOct 28, 2010
  9. Bron GondwanaOct 26, 2010

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.