On Fri, Feb 8, 2013 at 1:12 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Duy Nguyen <pclouds@xxxxxxxxx> writes: > >> I thought about that, but we may need to do extra stat() for loose >> garbage as well. As it is now, garbage is complained loudly, which >> gives me enough motivation to clean up, even without looking at how >> much disk space it uses. > > I wouldn't call a single line "garbage: 4" exactly *loud*. I also > think that this is not about *motivating* you, but about giving > more information to the users to help them assess the health of > their repository themselves. That's not the only line it prints: error: garbage found: .git/objects/pack/pack-8074dfd2b01f494a30f02d0374baa57632d26fea.commits error: garbage found: .git/objects/pack/pack-834c9dccca7634c2b225db1b5050a980cb2c2de0.commits error: garbage found: .git/objects/pack/tmp_pack_G235da error: garbage found: .git/objects/pack/pack-8bdf298e9252573289cd4f1e83e80c9f261882a2.commits count: 604 size: 5576 in-pack: 172307 packs: 4 size-pack: 50421 prune-packable: 4 garbage: 4 > By the way, I wonder if we also want to notice .git/objects/garbage > or .git/objects/ga/rbage if we are to do this? I prefer not (for code simplicity) because we may need to catch .git/objects/pack/info/garbage too if we do that. >> + if (!has_extension(de->d_name, ".pack")) { >> + report_pack_garbage(path, 0, NULL); >> + continue; >> + } > > Didn't I already say the logic should be inverted to whitelist the > known ones? Saying "Anything that is not '.pack' is bad" here is a > direct opposite, I think. I must have missed it. Will do. > > Add "A '.keep' file is OK" to this codeflow and see how it goes. OK -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html