X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-count-objects.c;h=f5b22bb80e23aef6acde2533701b7b56150948b6;hb=60c0f8462fefed22fc8fb9c4e529665ed8204536;hp=1d3729aa9914d6c68dbb6ad11cb46504b4a688e0;hpb=f3c5b39567535a41a371aad8a6affbeea0d4c0b9;p=git.git diff --git a/builtin-count-objects.c b/builtin-count-objects.c index 1d3729aa9..f5b22bb80 100644 --- a/builtin-count-objects.c +++ b/builtin-count-objects.c @@ -62,7 +62,7 @@ static void count_objects(DIR *d, char *path, int len, int verbose, hex[40] = 0; if (get_sha1_hex(hex, sha1)) die("internal error"); - if (has_sha1_pack(sha1)) + if (has_sha1_pack(sha1, NULL)) (*packed_loose)++; } } @@ -105,16 +105,19 @@ int cmd_count_objects(int ac, const char **av, const char *prefix) } if (verbose) { struct packed_git *p; + unsigned long num_pack = 0; if (!packed_git) prepare_packed_git(); for (p = packed_git; p; p = p->next) { if (!p->pack_local) continue; packed += num_packed_objects(p); + num_pack++; } printf("count: %lu\n", loose); printf("size: %lu\n", loose_size / 2); printf("in-pack: %lu\n", packed); + printf("packs: %lu\n", num_pack); printf("prune-packable: %lu\n", packed_loose); printf("garbage: %lu\n", garbage); }