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

Re: share object storage for multiple clones of different repositories

From
GNGelonida N <gelonida@gmail.com>
Date
Nov 5, 2011, 16:06 UTC
Message-ID
<j93mu2$ce7$1@dough.gmane.org>
In-Reply-To
<op.v4gp4mai0aolir@keputer.lokaal>
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:
Show 31 quoted lines
> On Sat, 05 Nov 2011 03:26:11 +0100, Junio C Hamano <gitster@pobox.com>
> wrote:
> 
>> Gelonida N <gelonida@gmail.com> 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.
> 
> 
> 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
Previous: Frans KlaverNext: Gelonida N
Message 4 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.