{"thread":{"id":"15308","subject":"git gc can require using a *huge* amount of space","startedAt":"2008-09-01T01:22:18Z","lastAt":"2008-09-01T01:22:18Z","messageCount":1,"participants":["Theodore Ts'o"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"89354","messageId":"E1KZy7W-00023U-UN@closure.thunk.org","threadId":"15308","inReplyTo":null,"subject":"git gc can require using a *huge* amount of space","fromName":"Theodore Ts'o","fromEmail":"tytso@mit.edu","sentAt":"2008-09-01T01:22:18Z","receivedAt":"2008-09-01T01:22:18Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"\nOne of the things which I noticed which can be a bit of a misfeature is\nif you are trying to save disk space by running \"git gc\", it can\nsometimes take *substantially* more disk space.  For example, I ran \"git\nreflog --all --expire=0 --expire-unreachable=0\" on a repository that had\nlinux-next as one of its remotes.  Before I ran \"git gc --prune\" the\nrepository was packed, and its .git/objects was a bit over 50 megs\n(there was an alternates file).  While I was running the \"git gc\", it\nwas busy ejecting all of the objects that were no longer reachable\nseparate files, and the size of .git/objects ballooned to over 200 megs,\nbefore settling in at 150 megs or so after \"git gc\" completed.  After I\nran \"git prune\", the size of .git/objects shrank back down to 48 megs.\n\nThat kind of swing in disk usage seems a bit excessive....  maybe\ninstead of pushing out all of the no-longer-reachable objects into\nseparate files, they could be put in a separate pack file (which the\nuser could then delete much more quickly than it would take \"git prune\"\nto run)?\n\n     \t     \t      \t   \t       \t     - Ted\n"}]}