[PATCH 1/3] prepare_packed_git(): find more garbage

2015-12-18 Thread Doug Kelly
.bitmap and .keep files without .idx/.pack don't make much sense, so make sure these are reported as garbage as well. At the same time, refactoring report_garbage to handle extra bits. Signed-off-by: Doug Kelly --- builtin/count-objects.c | 16 ++-- cache.h

Re: [PATCH 1/3] prepare_packed_git(): find more garbage

2015-12-15 Thread Jeff King
On Thu, Nov 26, 2015 at 12:15:29AM -0600, Doug Kelly wrote: > diff --git a/builtin/count-objects.c b/builtin/count-objects.c > index ba92919..5197b57 100644 > --- a/builtin/count-objects.c > +++ b/builtin/count-objects.c > @@ -17,19 +17,15 @@ static off_t loose_size; > > static const char

Re: [PATCH 1/3] prepare_packed_git(): find more garbage

2015-12-15 Thread Jeff King
On Tue, Dec 15, 2015 at 06:09:57PM -0500, Jeff King wrote: > > @@ -1225,6 +1225,15 @@ static void report_helper(const struct string_list > > *list, > [...] > If I understand this function correctly, we're just trying to > get rid of "boring" cases that do not need to be reported. BTW, I

Re: [PATCH 1/3] prepare_packed_git(): find more garbage

2015-11-25 Thread Stefan Beller
On Fri, Nov 13, 2015 at 4:46 PM, Doug Kelly wrote: > return "no corresponding .idx"; > - case PACKDIR_FILE_IDX: > + else if (seen_bits & PACKDIR_FILE_IDX && seen_bits ^ > ~PACKDIR_FILE_PACK) Did you intend to use (seen_bits & PACKDIR_FILE_IDX

[PATCH 1/3] prepare_packed_git(): find more garbage

2015-11-25 Thread Doug Kelly
.bitmap and .keep files without .idx/.pack don't make much sense, so make sure these are reported as garbage as well. At the same time, refactoring report_garbage to handle extra bits. Signed-off-by: Doug Kelly --- builtin/count-objects.c | 16 ++-- cache.h

Re: [PATCH 1/3] prepare_packed_git(): find more garbage

2015-11-25 Thread Doug Kelly
Apparently, I fixed this and forgot to re-run format-patch, so I sent out the same patch the second time... My fault on that one. I've at least checked what I sent this time around, and it seems to match what's in my current tree. :) The second and third patches should be unmodified. Thanks for

[PATCH 1/3] prepare_packed_git(): find more garbage

2015-11-13 Thread Doug Kelly
.bitmap and .keep files without .idx/.pack don't make much sense, so make sure these are reported as garbage as well. At the same time, refactoring report_garbage to handle extra bits. Signed-off-by: Doug Kelly --- builtin/count-objects.c | 16 ++-- cache.h

[PATCH 1/3] prepare_packed_git(): find more garbage

2015-11-13 Thread Doug Kelly
.bitmap and .keep files without .idx/.pack don't make much sense, so make sure these are reported as garbage as well. At the same time, refactoring report_garbage to handle extra bits. Signed-off-by: Doug Kelly --- builtin/count-objects.c | 16 ++-- cache.h

Re: [PATCH 1/3] prepare_packed_git(): find more garbage

2015-11-13 Thread Doug Kelly
Yes, without a doubt. I think I'm blaming this one on being late on a Friday afternoon, and really not thinking out the logic clearly. :) On Fri, Nov 13, 2015 at 4:43 PM, Stefan Beller wrote: >> + else if (seen_bits & PACKDIR_FILE_PACK && seen_bits ^ >>

Re: [PATCH 1/3] prepare_packed_git(): find more garbage

2015-11-13 Thread Stefan Beller
> + else if (seen_bits & PACKDIR_FILE_PACK && seen_bits ^ > ~PACKDIR_FILE_IDX) as just talked about: did you mention && !(seen_bits & FILE_IDX) > > + if (seen_bits == > (PACKDIR_FILE_PACK|PACKDIR_FILE_IDX|PACKDIR_FILE_BITMAP)) > + return; > + > + if (seen_bits ==