threads / discuss / 7163

Storage optimization with alternates

Subject: Storage optimization with alternates

## tl;dr

2 messages between Mar 9, 2007 and Mar 10, 2007.

replies: 1people: 2as markdown or json

Rocco Rutte· Mar 9, 2007, 18:31 UTC · lore
Hi,

I have a potential problem with my workflow: I mirror several hg repositories into git with one git repo per hg repo. Out of these and via remotes config, I set up another tree I actually work with having the master branch map to the hg HEAD branch of the official repo and topic branches for all other git repos.

The git tree for the main one and all other mirrors mostly share the same objects as hg2git and git-fast-import fortunately produce stable SHA1 checksums.

Is there any way I can clean up the feature repos by saying "remove all objects that you can reach via alternates already"?

If there's nothing like that, would git get confused if I simply moved the plain binary object files around from one dir to the other and setting up alternates?

I cloned the working repo from the main one using alternates and hope git doesn't fetch objects again it can already reach via alternates.

Somehow related is another git-fast-import feature request (maybe): when it attempts to add objects to the pack file with SHA1s it can already reach via alternates, don't add them to the pack. If that worked (I didn't check), I would only have the main repo with all the objects and the feature repos pretty lightweight...

   bye, Rocco
-- 
:wq!
Junio C Hamano· Mar 10, 2007, 01:49 UTC · re: Rocco Rutte · lore

Re: Storage optimization with alternates

Rocco Rutte <pdmef@gmx.net> writes:
> Is there any way I can clean up the feature repos by saying "remove
> all objects that you can reach via alternates already"?

"repack -a -d -l" ought to do that. It repacks while excluding the objects that are in a pack that is not local.

← back to recent threads