git gc does not clean tmp_pack* files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm currently hitting an issue trying to garbage collect a git repo in
case of low disk space.
After running "git gc" a bunch of times I tried to clean up more and
more space on the disk not realizing that when "git gc" fails it just
leaves the tmp_pack file there.

D:\Platform>git gc
...blah...
fatal: sha1 file '.git/objects/pack/tmp_pack_FG1inp' write error. Out
of diskspace
fatal: failed to run repack

D:\Platform>git gc
...blah...
fatal: sha1 file '.git/objects/pack/tmp_pack_IFvamY' write error. Out
of diskspace
fatal: failed to run repack

D:\Platform>git gc
...blah...
fatal: sha1 file '.git/objects/pack/tmp_pack_khHCC9' write error. Out
of diskspace
fatal: failed to run repack

D:\Platform>dir .git\objects\pack\tmp*
 Directory of D:\Platform\.git\objects\pack

12/18/2024  05:33 PM     7,367,032,832 tmp_pack_FG1inp
12/18/2024  05:35 PM     3,787,194,368 tmp_pack_IFvamY
12/18/2024  05:39 PM     7,713,062,912 tmp_pack_khHCC9
09/11/2024  11:33 AM     3,068,002,304 tmp_pack_XTVFUi
               4 File(s) 21,935,292,416 bytes
               0 Dir(s)         339,968 bytes free

I believe that before trying to write *anything* to disk "git gc"
should try to take exclusive handles on these and wipe them, ideally
by default. The total size of these tmp* files is multiple times
larger than the repo I'm trying to compact, so if the command just did
this pre-cleaning I'd not have hit this problem once I cleaned enough
disk space.

Please let me know your thoughts on this.

-Vitaly




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux