{"thread":{"id":"7163","subject":"Storage optimization with alternates","startedAt":"2007-03-09T18:31:01Z","lastAt":"2007-03-10T01:49:25Z","messageCount":2,"participants":["Rocco Rutte","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"36683","messageId":"20070309183100.GC7052@peter.daprodeges.fqdn.th-h.de","threadId":"7163","inReplyTo":null,"subject":"Storage optimization with alternates","fromName":"Rocco Rutte","fromEmail":"pdmef@gmx.net","sentAt":"2007-03-09T18:31:01Z","receivedAt":"2007-03-09T18:31:01Z","isPatch":false,"sender":{"key":"pdmef@gmx.net","avatar":null},"body":"Hi,\n\nI have a potential problem with my workflow: I mirror several hg \nrepositories into git with one git repo per hg repo. Out of these and \nvia remotes config, I set up another tree I actually work with having \nthe master branch map to the hg HEAD branch of the official repo and \ntopic branches for all other git repos.\n\nThe git tree for the main one and all other mirrors mostly share the \nsame objects as hg2git and git-fast-import fortunately produce stable \nSHA1 checksums.\n\nIs there any way I can clean up the feature repos by saying \"remove all \nobjects that you can reach via alternates already\"?\n\nIf there's nothing like that, would git get confused if I simply moved \nthe plain binary object files around from one dir to the other and \nsetting up alternates?\n\nI cloned the working repo from the main one using alternates and hope \ngit doesn't fetch objects again it can already reach via alternates.\n\nSomehow related is another git-fast-import feature request (maybe): when \nit attempts to add objects to the pack file with SHA1s it can already \nreach via alternates, don't add them to the pack. If that worked (I \ndidn't check), I would only have the main repo with all the objects and \nthe feature repos pretty lightweight...\n\n   bye, Rocco\n-- \n:wq!\n"},{"id":"36714","messageId":"7vwt1pzx3u.fsf@assigned-by-dhcp.cox.net","threadId":"7163","inReplyTo":"20070309183100.GC7052@peter.daprodeges.fqdn.th-h.de","subject":"Re: Storage optimization with alternates","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-10T01:49:25Z","receivedAt":"2007-03-10T01:49:25Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Rocco Rutte <pdmef@gmx.net> writes:\n\n> Is there any way I can clean up the feature repos by saying \"remove\n> all objects that you can reach via alternates already\"?\n\n\"repack -a -d -l\" ought to do that.  It repacks while excluding\nthe objects that are in a pack that is not local.\n"}]}