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

Re: Local clones aka forks disk size optimization

From
Javier Domingo <javierdo1@gmail.com>
Date
Nov 15, 2012, 01:15 UTC
Message-ID
<CALZVapmBM78UtjAiNm2VoeWuetCiyxN70mTxbG14SQh5a5RCeQ@mail.gmail.com>
In-Reply-To
<CAH5451m4saVa7-NLbVbXp7q8ca5_0N4FLk3wYaqxLT=AE5frbw@mail.gmail.com>
Hi Andrew,

Doing this would require I got tracked which one comes from which. So it would imply some logic (and db) over it. With the hardlinking way, it wouldn't require anything. The idea is that you don't have to do anything else in the server.

I understand that it would be imposible to do it for windows users (but using cygwin), but for *nix ones yes... Javier Domingo

2012/11/15 Andrew Ardill <andrew.ardill@gmail.com>:
Show 29 quoted lines
> On 15 November 2012 11:40, Javier Domingo <javierdo1@gmail.com> wrote:
>> Hi Andrew,
>>
>> The problem about that, is that if I want to delete the first repo, I
>> will loose objects... Or does that repack also hard-link the objects
>> in other repos? I don't want to accidentally loose data, so it would
>> be nice that althought avoided to repack things, it would also
>> hardlink them.
>
> Hi Javier, check out the section below the one I linked earlier:
>
>> How to stop sharing objects between repositories?
>>
>> To copy the shared objects into the local repository, repack without the -l flag
>>
>> git repack -a
>>
>> Then remove the pointer to the alternate object store
>>
>> rm .git/objects/info/alternates
>>
>> (If the repository is edited between the two steps, it could become corrupted
>> when the alternates file is removed. If you're unsure, you can use git fsck to
>> check for corruption. If things go wrong, you can always recover by replacing
>> the alternates file and starting over).
>
> Regards,
>
> Andrew Ardill
Previous: Andrew ArdillNext: Andrew Ardill
Message 5 of 13 in “Fwd: Local clones aka forks disk size optimization”
  1. Javier DomingoNov 14, 2012
  2. Andrew ArdillNov 15, 2012
  3. Javier DomingoNov 15, 2012
  4. Andrew ArdillNov 15, 2012
  5. Javier DomingoNov 15, 2012
  6. Andrew ArdillNov 15, 2012
  7. Sitaram ChamartyNov 15, 2012
  8. Michael J GruberNov 16, 2012
  9. Enrico WeigeltNov 16, 2012
  10. Sitaram ChamartyNov 18, 2012
  11. Enrico WeigeltNov 18, 2012
  12. Pyeron, Jason J CTR (US)Nov 16, 2012
  13. Jörg RosenkranzNov 18, 2012

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.