summaryrefslogtreecommitdiff
path: root/builtin-count-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-08-19 21:25:48 -0700
committerJunio C Hamano <gitster@pobox.com>2008-08-19 21:25:48 -0700
commit55e839e378416b70720308e86439e2ad6ecccc4a (patch)
tree7a1b3c7de312a3debae53eb7a7fb5a52aa1d3e4e /builtin-count-objects.c
parent6457e58c8fc00ef1c72724dad5f8baf54cfee5a2 (diff)
parent180964f0b98344f3127d6b8167cec8a07ef663ad (diff)
downloadgit-55e839e378416b70720308e86439e2ad6ecccc4a.tar.gz
Merge branch 'js/mingw-stat'
* js/mingw-stat: Revert "Windows: Use a customized struct stat that also has the st_blocks member." compat: introduce on_disk_bytes()
Diffstat (limited to 'builtin-count-objects.c')
-rw-r--r--builtin-count-objects.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-count-objects.c b/builtin-count-objects.c
index 91b5487478..a1c9eb41cb 100644
--- a/builtin-count-objects.c
+++ b/builtin-count-objects.c
@@ -43,7 +43,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) += xsize_t(st.st_blocks);
+ (*loose_size) += xsize_t(on_disk_bytes(st));
}
if (bad) {
if (verbose) {
@@ -115,7 +115,7 @@ int cmd_count_objects(int argc, const char **argv, const char *prefix)
num_pack++;
}
printf("count: %lu\n", loose);
- printf("size: %lu\n", loose_size / 2);
+ printf("size: %lu\n", loose_size / 1024);
printf("in-pack: %lu\n", packed);
printf("packs: %lu\n", num_pack);
printf("prune-packable: %lu\n", packed_loose);