{"thread":{"id":"1797","subject":"does git prune packs?","startedAt":"2005-09-14T11:13:42Z","lastAt":"2005-09-14T15:30:03Z","messageCount":4,"participants":["Jeff Garzik","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"8512","messageId":"432805E6.6030905@pobox.com","threadId":"1797","inReplyTo":null,"subject":"does git prune packs?","fromName":"Jeff Garzik","fromEmail":"jgarzik@pobox.com","sentAt":"2005-09-14T11:13:42Z","receivedAt":"2005-09-14T11:13:42Z","isPatch":false,"sender":{"key":"jgarzik@pobox.com","avatar":null},"body":"\nDoes git-prune-packed eliminate packs that have been superceded by other \npacks?\n\n\tJeff\n"},{"id":"8523","messageId":"Pine.LNX.4.58.0509140808010.26803@g5.osdl.org","threadId":"1797","inReplyTo":"432805E6.6030905@pobox.com","subject":"Re: does git prune packs?","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-09-14T15:08:27Z","receivedAt":"2005-09-14T15:08:27Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Wed, 14 Sep 2005, Jeff Garzik wrote:\n> \n> Does git-prune-packed eliminate packs that have been superceded by other \n> packs?\n\nNope. Pretty hard to do. Unless you just repack everything, at which point\n\n\tgit repack -a -d\n\nwill do the right thing.\n\n\t\tLinus\n"},{"id":"8525","messageId":"43283E66.5080101@pobox.com","threadId":"1797","inReplyTo":"Pine.LNX.4.58.0509140808010.26803@g5.osdl.org","subject":"Re: does git prune packs?","fromName":"Jeff Garzik","fromEmail":"jgarzik@pobox.com","sentAt":"2005-09-14T15:14:46Z","receivedAt":"2005-09-14T15:14:46Z","isPatch":false,"sender":{"key":"jgarzik@pobox.com","avatar":null},"body":"Linus Torvalds wrote:\n> \n> On Wed, 14 Sep 2005, Jeff Garzik wrote:\n> \n>>Does git-prune-packed eliminate packs that have been superceded by other \n>>packs?\n> \n> \n> Nope. Pretty hard to do. Unless you just repack everything, at which point\n> \n> \tgit repack -a -d\n> \n> will do the right thing.\n\nI never repack, I just use your packs.\n\nEasier on my hard disk, vastly reduces upload time (cable modem == slow \nuploads), since I can ssh to master.kernel.org and hardlink, and easier \non kernel.org.\n\nI'll remove the old packs manually.\n\nThanks,\n\n\tJeff\n"},{"id":"8526","messageId":"Pine.LNX.4.58.0509140824090.26803@g5.osdl.org","threadId":"1797","inReplyTo":"43283E66.5080101@pobox.com","subject":"Re: does git prune packs?","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-09-14T15:30:03Z","receivedAt":"2005-09-14T15:30:03Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Wed, 14 Sep 2005, Jeff Garzik wrote:\n> \n> I never repack, I just use your packs.\n\nOh, ok. Then, do something like this:\n\n\tmv .git/objects/pack .git/objects/old-packs\n\tmkdir .git/objects/pack\n\tfor i in .git/objects/old-packs/*.pack\n\tdo\n\t\techo $i:\n\t\tgit-unpack-objects < $i\n\tdone\n\nand it will do the right thing. Doing the right thing means, among other \nthings, that if an object already exists in an alternate object directory, \nit won't be written to disk again.\n\n(So if you have an \"alternates\" file pointing to my objects, and your \npacks contain mainly/only objects that I've pulled, basically nothing will \nactually be unpacked.)\n\nAfter that, do a git-fsck-cache to make sure everything looks good, and \njust \"rm -rf .git/objects/old-packs\".\n\nAnd yes, we could make something like this a helper script.\n\nNOTE! During the unpacking, the repository may not be usable, so make sure \nthat nobody else tries to access it while you do this.\n\n\t\tLinus\n"}]}