Re: share object storage for multiple clones of different repositories

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: share object storage for multiple clones of different repositories

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:23

Gelonida N [off-list ref] writes:
SHARED_STORAGE=$HOME/shared_storage
mkdir $SHARED_STORAGE

git clone remotehost1:repo1
cd repo1
rsync -av .git/objects $SHARED_REPO
Up to this part it is probably OK.  Repeat that for all your local
repositories to collect all objects in $HOME/shared_storage.

After doing that, do this in all of your local repositories:

	rm -rf .git/objects
        mkdir -p .git/objects/info
        echo $HOME/shared/storage >.git/objects/info/alternates

The reason why nobody should follow your original recipe is because any
"git gc"/"git repack" in any of your local repositories would break others
with that approach.

Re: share object storage for multiple clones of different repositories

From: Frans Klaver <hidden>
Date: 2016-06-15 22:52:23

On Sat, 05 Nov 2011 03:26:11 +0100, Junio C Hamano [off-list ref]  
wrote:
Gelonida N [off-list ref] writes:
quoted
SHARED_STORAGE=$HOME/shared_storage
mkdir $SHARED_STORAGE

git clone remotehost1:repo1
cd repo1
rsync -av .git/objects $SHARED_REPO
Up to this part it is probably OK.  Repeat that for all your local
repositories to collect all objects in $HOME/shared_storage.

After doing that, do this in all of your local repositories:

	rm -rf .git/objects
        mkdir -p .git/objects/info
        echo $HOME/shared/storage >.git/objects/info/alternates

The reason why nobody should follow your original recipe is because any
"git gc"/"git repack" in any of your local repositories would break  
others
with that approach.

Alternatively there's the git-new-workdir script in contrib/workdir in  
git.git. Haven't tested it, but it seems like it does what you want.

Frans

Re: share object storage for multiple clones of different repositories

From: Gelonida N <hidden>
Date: 2016-06-15 22:52:23

Thanks for both of your replies,


I'll probably mix both approaches and try out how it works.
I didn't know about git.git
What is the best url for an intrudoction into git.git?




On 11/05/2011 08:37 AM, Frans Klaver wrote:
On Sat, 05 Nov 2011 03:26:11 +0100, Junio C Hamano [off-list ref]
wrote:
quoted
Gelonida N [off-list ref] writes:
quoted
SHARED_STORAGE=$HOME/shared_storage
mkdir $SHARED_STORAGE

git clone remotehost1:repo1
cd repo1
rsync -av .git/objects $SHARED_REPO
Up to this part it is probably OK.  Repeat that for all your local
repositories to collect all objects in $HOME/shared_storage.

After doing that, do this in all of your local repositories:

    rm -rf .git/objects
        mkdir -p .git/objects/info
        echo $HOME/shared/storage >.git/objects/info/alternates

The reason why nobody should follow your original recipe is because any
"git gc"/"git repack" in any of your local repositories would break
others
with that approach.

Alternatively there's the git-new-workdir script in contrib/workdir in
git.git. Haven't tested it, but it seems like it does what you want.

Frans

Re: share object storage for multiple clones of different repositories

From: Gelonida N <hidden>
Date: 2016-06-15 22:52:23

On 11/05/2011 05:06 PM, Gelonida N wrote:
Thanks for both of your replies,


I'll probably mix both approaches and try out how it works.
I didn't know about git.git
What is the best url for an intrudoction into git.git?

quoted
Alternatively there's the git-new-workdir script in contrib/workdir in
git.git. Haven't tested it, but it seems like it does what you want.

Frans
In an installed git (at least on Ubuntu) the contrib directory can be
found at /usr/share/doc/git/contrib
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help