{"thread":{"id":"41217","subject":"git gc leaved my disk 100% full","startedAt":"2016-01-19T16:09:57Z","lastAt":"2016-02-04T07:58:24Z","messageCount":2,"participants":["Jean Delvare","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"276345","messageId":"20160119170957.6e69ebb8@endymion.delvare","threadId":"41217","inReplyTo":null,"subject":"git gc leaved my disk 100% full","fromName":"Jean Delvare","fromEmail":"jdelvare@suse.de","sentAt":"2016-01-19T16:09:57Z","receivedAt":"2016-01-19T16:09:57Z","isPatch":false,"sender":{"key":"jdelvare@suse.de","avatar":null},"body":"Hi git developers,\n\nEarlier today my desktop environment warned me that my /home was almost\nfull. I thought that running \"git gc\" on my git trees would maybe save\nsome disk space.\n\nUnfortunately the opposite happened. \"git gc\" failed on me with:\n\nfatal: sha1 file '.git/objects/pack/tmp_idx_XW7opV' write error: No space left on device\nerror: failed to run repack\n\nand at that point the partition was 100% full. My git repository went\nfrom 2.2 GB to 3.3 GB in the process, this is why.\n\nWhile I understand the value of preserving temporary files for\ndebugging purpose, I don't think it makes sense in the context of the\n\"gc\" command which precisely should get rid of such temporary files.\n\nSo please consider fixing \"gc\" so that it cleans up any temporary file\nin case of failure.\n\nThanks,\n-- \nJean Delvare\nSUSE L3 Support\n"},{"id":"277374","messageId":"20160204075823.GB21161@sigill.intra.peff.net","threadId":"41217","inReplyTo":"20160119170957.6e69ebb8@endymion.delvare","subject":"Re: git gc leaved my disk 100% full","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-02-04T07:58:24Z","receivedAt":"2016-02-04T07:58:24Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jan 19, 2016 at 05:09:57PM +0100, Jean Delvare wrote:\n\n> Earlier today my desktop environment warned me that my /home was almost\n> full. I thought that running \"git gc\" on my git trees would maybe save\n> some disk space.\n> \n> Unfortunately the opposite happened. \"git gc\" failed on me with:\n> \n> fatal: sha1 file '.git/objects/pack/tmp_idx_XW7opV' write error: No space left on device\n> error: failed to run repack\n> \n> and at that point the partition was 100% full. My git repository went\n> from 2.2 GB to 3.3 GB in the process, this is why.\n> \n> While I understand the value of preserving temporary files for\n> debugging purpose, I don't think it makes sense in the context of the\n> \"gc\" command which precisely should get rid of such temporary files.\n> \n> So please consider fixing \"gc\" so that it cleans up any temporary file\n> in case of failure.\n\nI agree that it would be nice to auto-clean failed object creation. Or\nat least make it a configurable option. We have hacky patches at GitHub\nto do so unconditionally, as we ran into problems with failed pushes\npiling up.\n\nI didn't send it upstream, because it involved building against a\nseparate and ugly tempfile API. Now that we have tempfile.[ch] upstream,\nI think it wouldn't be too hard to do with register_tempfile().\n\n-Peff\n"}]}