builtin-pack-object: cache small deltas
[gitweb.git] / builtin-count-objects.c
index f5b22bb80e23aef6acde2533701b7b56150948b6..ff90ebd465002882781507ecfcfc33cab2f759fc 100644 (file)
@@ -44,7 +44,7 @@ static void count_objects(DIR *d, char *path, int len, int verbose,
                        if (lstat(path, &st) || !S_ISREG(st.st_mode))
                                bad = 1;
                        else
-                               (*loose_size) += st.st_blocks;
+                               (*loose_size) += xsize_t(st.st_blocks);
                }
                if (bad) {
                        if (verbose) {
@@ -111,7 +111,7 @@ int cmd_count_objects(int ac, const char **av, const char *prefix)
                for (p = packed_git; p; p = p->next) {
                        if (!p->pack_local)
                                continue;
-                       packed += num_packed_objects(p);
+                       packed += p->num_objects;
                        num_pack++;
                }
                printf("count: %lu\n", loose);