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

GIT_OBJECT_DIRECTORY

From
JEJörn Engel <joern@wohnheim.fh-wedel.de>
Date
Apr 18, 2006, 13:38 UTC
Message-ID
<20060418133847.GC4720@wohnheim.fh-wedel.de>
Hi!

I recently noticed GIT_OBJECT_DIRECTORY in the git manpage and wanted to play with it. But it looks as if it doesn't work, the documentation is wrong/insufficient or I can't properly read the documentation. So let me figure out, which one it is.

$ set | grep GIT_OBJECT_DIRECTORY GIT_OBJECT_DIRECTORY=/home/joern/.git

$ ls -l /home/joern/.git total 288 drwxrwxr-x 2 joern joern 4096 Apr 16 01:22 0f [...]

$ git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git foo [ stored >200M of data under foo/.git/objects ]

The above looks as if new objects are not stored under /home/joern/.git, as specified by GIT_OBJECT_DIRECTORY. The manpage tells me:

       GIT_OBJECT_DIRECTORY
              If  the  object storage directory is specified via this environ-
              ment variable then the sha1 directories are created underneath -
              otherwise the default $GIT_DIR/objects directory is used.

And I would interpret this as "store all new objects under /home/joern/.git". So far, things don't seem to imply me being too stupid. What went wrong?

Jörn
-- 
Why do musicians compose symphonies and poets write poems?
They do it because life wouldn't have any meaning for them if they didn't.
That's why I draw cartoons.  It's my life.
-- Charles Shultz
Next: Linus Torvalds
Message 1 of 12 in “GIT_OBJECT_DIRECTORY”
  1. Jörn EngelApr 18, 2006
  2. Linus TorvaldsApr 18, 2006
  3. Jörn EngelApr 18, 2006
  4. Sam RavnborgApr 18, 2006
  5. Linus TorvaldsApr 18, 2006
  6. Jörn EngelApr 18, 2006
  7. Linus TorvaldsApr 18, 2006
  8. Jörn EngelApr 18, 2006
  9. H. Peter AnvinApr 19, 2006
  10. Junio C HamanoApr 19, 2006
  11. Junio C HamanoApr 18, 2006
  12. Jörn EngelApr 18, 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.