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

share object storage for multiple clones of different repositories

From
GNGelonida N <gelonida@gmail.com>
Date
Nov 4, 2011, 23:10 UTC
Message-ID
<j91rcq$1uo$1@dough.gmane.org>
Hi,
(Thunderbird frozewhile sending my previous message so here a resend)

I wondered whether it is possible, that all of my git repository clones share the same object storage whether they are cloned from they same remote repository or not.

In my case this might save a lot of diskspace and accelerate cloning as some huge files are part of several repositories' history and as I'd like to clone the same repository multiple times in order to have parallel working directories for parallel tests on different versions / branches / tags

Further this might reduce clone times.
My goal would be to:
- reduce disk space
- reduce clone time, as objects would be taken from the existing shared
  object storage

If possible it would be great if also all new created shared objects would end up in the new object storage.

If git doesn't support this natively, then would following approach work for reducing the disk space (clone time would not be reduced though)

SHARED_STORAGE=$HOME/shared_storage mkdir $SHARED_STORAGE

git clone remotehost1:repo1 cd repo1 rsync -av .git/objects $SHARED_REPO rm -rf .git/objects ln -s $SHARED_REPO/objects .git/

git clone remotehost2:repo2 cd repo2 rsync -av .git/objects $SHARED_REPO rm -rf .git/objects ln -s $SHARED_REPO/objects .git/

Thanks for any feedback or other suggestions.
Next: Junio C Hamano
Message 1 of 5 in “share object storage for multiple clones of different repositories”
  1. Gelonida NNov 4, 2011
  2. Junio C HamanoNov 5, 2011
  3. Frans KlaverNov 5, 2011
  4. Gelonida NNov 5, 2011
  5. Gelonida NNov 5, 2011

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.