git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gelonida N <gelonida@gmail.com>
To: git@vger.kernel.org
Subject: share object storage for multiple clones of different repositories
Date: Sat, 05 Nov 2011 00:10:18 +0100	[thread overview]
Message-ID: <j91rcq$1uo$1@dough.gmane.org> (raw)

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.

             reply	other threads:[~2011-11-04 23:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-04 23:10 Gelonida N [this message]
2011-11-05  2:26 ` share object storage for multiple clones of different repositories Junio C Hamano
2011-11-05  7:37   ` Frans Klaver
2011-11-05 16:06     ` Gelonida N
2011-11-05 16:20       ` Gelonida N

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='j91rcq$1uo$1@dough.gmane.org' \
    --to=gelonida@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).