Re: [PATCH 2/2] count-objects: report garbage files in .git/objects/pack directory too

2013-02-07 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com 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

Re: [PATCH 2/2] count-objects: report garbage files in .git/objects/pack directory too

2013-02-07 Thread Duy Nguyen
On Fri, Feb 8, 2013 at 1:12 AM, Junio C Hamano gits...@pobox.com wrote: Duy Nguyen pclo...@gmail.com 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

Re: [PATCH 2/2] count-objects: report garbage files in .git/objects/pack directory too

2013-02-06 Thread Duy Nguyen
On Mon, Feb 04, 2013 at 10:16:23AM -0800, Junio C Hamano wrote: I forgot to mention one more thing. Your report_pack_garbage() special cases .pack to see if it is a regular file, but this loop structure causes a regular file whose name ends with .pack but without corresponding .idx file to go

Re: [PATCH 2/2] count-objects: report garbage files in .git/objects/pack directory too

2013-02-04 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: The hook in prepare_packed_git_one is ugly, but I don't want to duplicate the search file logic there in count-objects. Maybe I'm wrong. In this particular case I do not think you are completely wrong; you are probably only two thirds wrong

Re: [PATCH 2/2] count-objects: report garbage files in .git/objects/pack directory too

2013-02-04 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: @@ -1024,11 +1035,15 @@ static void prepare_packed_git_one(char *objdir, int local) int namelen = strlen(de-d_name); struct packed_git *p; - if (!has_extension(de-d_name, .idx)) + if