@matheusbsbs / matheus-bagliano / commits / ae72f68541
Fork 0

count-objects -v: show number of packs as well.

Recent "git push" keeps transferred objects packed much more aggressively than before. Monitoring output from git-count-objects -v for number of loose objects is not enough to decide when to repack -- having too many small packs is also a good cue for repacking. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Dec 27, 2006 at 01:04 UTC ae72f685418b79bbd67e1017c5b1ac7d731c042e
2 files changed +5 -2
Documentation/git-count-objects.txt
+2 -2
@@ -20,8 +20,8 @@ OPTIONS
20 -v::
21 In addition to the number of loose objects and disk
22 space consumed, it reports the number of in-pack
23 - objects, and number of objects that can be removed by
24 - running `git-prune-packed`.
23 + objects, number of packs, and number of objects that can be
24 + removed by running `git-prune-packed`.
25
26
27 Author
builtin-count-objects.c
+3
@@ -105,16 +105,19 @@ int cmd_count_objects(int ac, const char **av, const char *prefix)
105 }
106 if (verbose) {
107 struct packed_git *p;
108 + unsigned long num_pack = 0;
109 if (!packed_git)
110 prepare_packed_git();
111 for (p = packed_git; p; p = p->next) {
112 if (!p->pack_local)
113 continue;
114 packed += num_packed_objects(p);
115 + num_pack++;
116 }
117 printf("count: %lu\n", loose);
118 printf("size: %lu\n", loose_size / 2);
119 printf("in-pack: %lu\n", packed);
120 + printf("packs: %lu\n", num_pack);
121 printf("prune-packable: %lu\n", packed_loose);
122 printf("garbage: %lu\n", garbage);
123 }