* Git pack - repo size doubled @ 2011-02-24 8:19 Maaartin 2011-02-24 8:31 ` Jeff King 0 siblings, 1 reply; 3+ messages in thread From: Maaartin @ 2011-02-24 8:19 UTC (permalink / raw) To: git I'm using git version 1.7.3.3 under cygwin (W XP64). When I tried git repack -A -d --depth=255 --window=255 --window-memory=4g I've got the message rm: cannot remove `pack-c75642be5314b1a98ddfcf0d51ac838db4af75ad.pack': Device or resource busy It seems like the file hadn't got closed. The non-deletion of the file roughly doubles the repo size (134070 KiB instead of 67470 KiB). - Can I manually remove the file? - If I do it, does "git fsck" suffice to make sure, everything's all right? - Would creating of multiple packs work better? What "--max-pack-size" would you recommend? ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Git pack - repo size doubled 2011-02-24 8:19 Git pack - repo size doubled Maaartin @ 2011-02-24 8:31 ` Jeff King 2011-02-24 10:02 ` Maaartin-1 0 siblings, 1 reply; 3+ messages in thread From: Jeff King @ 2011-02-24 8:31 UTC (permalink / raw) To: Maaartin; +Cc: git On Thu, Feb 24, 2011 at 09:19:06AM +0100, Maaartin wrote: > I'm using git version 1.7.3.3 under cygwin (W XP64). When I tried > > git repack -A -d --depth=255 --window=255 --window-memory=4g > > I've got the message > > rm: cannot remove `pack-c75642be5314b1a98ddfcf0d51ac838db4af75ad.pack': > Device or resource busy Presumably some git process still has the pack open, and Windows can't delete open files. The process which removes the old pack is different from the one that creates the new pack, so there shouldn't be conflict there. Were you running any other git programs at the time? > It seems like the file hadn't got closed. The non-deletion of the file > roughly doubles the repo size (134070 KiB instead of 67470 KiB). > > - Can I manually remove the file? Probably. Move it (and its associated .idx file) out of the pack directory, and then run "git fsck" to make sure all is well. > - If I do it, does "git fsck" suffice to make sure, everything's all right? As a general rule, almost certainly, but there is one corner case. "git fsck" will proceed from your refs and reflogs and check that nothing is missing. But it's possible that you had unreferenced objects in the old pack which will now be lost. In practice, this doesn't really matter much. Due to reflogs, things don't tend to be unreferenced. And even if they are, they are probably worthless old cruft that was expired from the reflog. In your case, it is even more certain. Since you used "-A", unreachable objects in the original pack were exploded into loose objects. So assuming that process worked correctly, then everything in that pack is duplicated. > - Would creating of multiple packs work better? What "--max-pack-size" > would you recommend? It shouldn't make a difference. This is about removing the old pack; it shouldn't matter how many new packs you've made, unless there is some bug. -Peff ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Git pack - repo size doubled 2011-02-24 8:31 ` Jeff King @ 2011-02-24 10:02 ` Maaartin-1 0 siblings, 0 replies; 3+ messages in thread From: Maaartin-1 @ 2011-02-24 10:02 UTC (permalink / raw) To: Jeff King; +Cc: git On 11-02-24 09:31, Jeff King wrote: > On Thu, Feb 24, 2011 at 09:19:06AM +0100, Maaartin wrote: > >> I'm using git version 1.7.3.3 under cygwin (W XP64). When I tried >> >> git repack -A -d --depth=255 --window=255 --window-memory=4g >> >> I've got the message >> >> rm: cannot remove `pack-c75642be5314b1a98ddfcf0d51ac838db4af75ad.pack': >> Device or resource busy > > Presumably some git process still has the pack open, and Windows can't > delete open files. The process which removes the old pack is different > from the one that creates the new pack, so there shouldn't be conflict > there. Were you running any other git programs at the time? I was sure I weren't, otherwise I wouldn't have posted this. The problem was reproducible. But there was EGit, what I didn't thing about. It must have been the culprit, now it works perfectly. >> It seems like the file hadn't got closed. The non-deletion of the file >> roughly doubles the repo size (134070 KiB instead of 67470 KiB). >> >> - Can I manually remove the file? > > Probably. Move it (and its associated .idx file) out of the pack > directory, and then run "git fsck" to make sure all is well. OK. >> - If I do it, does "git fsck" suffice to make sure, everything's all right? > > As a general rule, almost certainly, but there is one corner case. "git > fsck" will proceed from your refs and reflogs and check that nothing is > missing. > > But it's possible that you had unreferenced objects in the old pack > which will now be lost. In practice, this doesn't really matter much. > Due to reflogs, things don't tend to be unreferenced. And even if they > are, they are probably worthless old cruft that was expired from the > reflog. > > In your case, it is even more certain. Since you used "-A", unreachable > objects in the original pack were exploded into loose objects. So > assuming that process worked correctly, then everything in that pack is > duplicated. OK. >> - Would creating of multiple packs work better? What "--max-pack-size" >> would you recommend? > > It shouldn't make a difference. This is about removing the old pack; it > shouldn't matter how many new packs you've made, unless there is some > bug. This was meant as a workaround: create more smaller packs, manually delete the large one, so that in the future maybe only one smaller pack would get undeleted. But it was my fault and no bug at all. Thanks a lot. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-24 10:17 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-02-24 8:19 Git pack - repo size doubled Maaartin 2011-02-24 8:31 ` Jeff King 2011-02-24 10:02 ` Maaartin-1
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).