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

read-only working copies using links

From
CDChad Dombrova <chadrik@gmail.com>
Date
Jan 24, 2009, 09:17 UTC
Message-ID
<3EE64C92-CB4C-47BD-9C48-E369AED4B82F@gmail.com>
hi all,

there's a major feature for working with large binaries that has not yet been addressed by git: the ability to check out a file as a symbolic/hard link to a blob in the repository, instead of duplicating the file into the working copy.

imagine a scenario where one user is putting large binary files into a git repo on a networked server. 100 other users on the server need read-only access to this repo. they clone the repo using --shared or --local, which saves disk space for the object files, but each of these 100 working copies also creates copies of all the binary files at the HEAD revision. it would be 100x as efficient in both disk space and checkout speeds if, in place of these files, symbolic or hard links were made to the blob files in .git/objects.

the crux of the issue is that the blob objects would have to be stored as exact copies of the original files. it would seem there are two things that currently prevent this from happening. 1) blobs are stored with compression and 2) they include a small header. compression can be disabled by setting core.loosecompression to 0, so that seems like less of an issue. as for the header, wouldn't it be possible to store it separately? in other words, store two files per blob directory, a small stub file with the header info and the unaltered file data.

what are the caveats to a system like this? has anyone looked into this before?

-chad

p.s. i tried submitting a post through nabble a few days and it said that it was still pending, so i thought i'd try submitting directly to the mailing list. sorry, if i end up double-posting

Next: Sverre Rabbelier
Message 1 of 6 in “read-only working copies using links”
  1. Chad DombrovaJan 24, 2009
  2. Sverre RabbelierJan 24, 2009
  3. Chad DombrovaJan 24, 2009
  4. Sverre RabbelierJan 24, 2009
  5. Jeff KingJan 24, 2009
  6. Jeff KingJan 24, 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.