summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-count-objects.txt4
-rw-r--r--builtin-count-objects.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/git-count-objects.txt b/Documentation/git-count-objects.txt
index 198ce77..c59df64 100644
--- a/Documentation/git-count-objects.txt
+++ b/Documentation/git-count-objects.txt
@@ -20,8 +20,8 @@ OPTIONS
-v::
In addition to the number of loose objects and disk
space consumed, it reports the number of in-pack
- objects, and number of objects that can be removed by
- running `git-prune-packed`.
+ objects, number of packs, and number of objects that can be
+ removed by running `git-prune-packed`.
Author
diff --git a/builtin-count-objects.c b/builtin-count-objects.c
index 73c5982..f5b22bb 100644
--- a/builtin-count-objects.c
+++ b/builtin-count-objects.c
@@ -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);
}