All of lore.kernel.org
 help / color / mirror / Atom feed
* git gc leaved my disk 100% full
@ 2016-01-19 16:09 Jean Delvare
  2016-02-04  7:58 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Jean Delvare @ 2016-01-19 16:09 UTC (permalink / raw)
  To: git

Hi git developers,

Earlier today my desktop environment warned me that my /home was almost
full. I thought that running "git gc" on my git trees would maybe save
some disk space.

Unfortunately the opposite happened. "git gc" failed on me with:

fatal: sha1 file '.git/objects/pack/tmp_idx_XW7opV' write error: No space left on device
error: failed to run repack

and at that point the partition was 100% full. My git repository went
from 2.2 GB to 3.3 GB in the process, this is why.

While I understand the value of preserving temporary files for
debugging purpose, I don't think it makes sense in the context of the
"gc" command which precisely should get rid of such temporary files.

So please consider fixing "gc" so that it cleans up any temporary file
in case of failure.

Thanks,
-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git gc leaved my disk 100% full
  2016-01-19 16:09 git gc leaved my disk 100% full Jean Delvare
@ 2016-02-04  7:58 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2016-02-04  7:58 UTC (permalink / raw)
  To: Jean Delvare; +Cc: git

On Tue, Jan 19, 2016 at 05:09:57PM +0100, Jean Delvare wrote:

> Earlier today my desktop environment warned me that my /home was almost
> full. I thought that running "git gc" on my git trees would maybe save
> some disk space.
> 
> Unfortunately the opposite happened. "git gc" failed on me with:
> 
> fatal: sha1 file '.git/objects/pack/tmp_idx_XW7opV' write error: No space left on device
> error: failed to run repack
> 
> and at that point the partition was 100% full. My git repository went
> from 2.2 GB to 3.3 GB in the process, this is why.
> 
> While I understand the value of preserving temporary files for
> debugging purpose, I don't think it makes sense in the context of the
> "gc" command which precisely should get rid of such temporary files.
> 
> So please consider fixing "gc" so that it cleans up any temporary file
> in case of failure.

I agree that it would be nice to auto-clean failed object creation. Or
at least make it a configurable option. We have hacky patches at GitHub
to do so unconditionally, as we ran into problems with failed pushes
piling up.

I didn't send it upstream, because it involved building against a
separate and ugly tempfile API. Now that we have tempfile.[ch] upstream,
I think it wouldn't be too hard to do with register_tempfile().

-Peff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-04  7:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-19 16:09 git gc leaved my disk 100% full Jean Delvare
2016-02-04  7:58 ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.