summaryrefslogtreecommitdiff
path: root/builtin-count-objects.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-01-18 21:37:06 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-01-18 21:37:06 -0800
commit814035c12a07927ea03350184a14f869cdce7276 (patch)
tree2bd7e76205be964e7379cc2d9fd2e7dc71003599 /builtin-count-objects.c
parentMerge commit 'v1.6.4.4-8-g8de6518' into maint-1.6.4 (diff)
parentMerge branch 'maint-1.6.2' into maint-1.6.3 (diff)
downloadtgif-814035c12a07927ea03350184a14f869cdce7276.tar.xz
Merge branch 'maint-1.6.3' into maint-1.6.4
* maint-1.6.3: base85: Make the code more obvious instead of explaining the non-obvious base85: encode_85() does not use the decode table base85 debug code: Fix length byte calculation checkout -m: do not try to fall back to --merge from an unborn branch branch: die explicitly why when calling "git branch [-a|-r] branchname". textconv: stop leaking file descriptors commit: --cleanup is a message option git count-objects: handle packs bigger than 4G t7102: make the test fail if one of its check fails Conflicts: builtin-commit.c
Diffstat (limited to 'builtin-count-objects.c')
-rw-r--r--builtin-count-objects.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin-count-objects.c b/builtin-count-objects.c
index 1b0b6c84ea..2bdd8ebde1 100644
--- a/builtin-count-objects.c
+++ b/builtin-count-objects.c
@@ -11,7 +11,7 @@
static void count_objects(DIR *d, char *path, int len, int verbose,
unsigned long *loose,
- unsigned long *loose_size,
+ off_t *loose_size,
unsigned long *packed_loose,
unsigned long *garbage)
{
@@ -77,7 +77,7 @@ int cmd_count_objects(int argc, const char **argv, const char *prefix)
int len = strlen(objdir);
char *path = xmalloc(len + 50);
unsigned long loose = 0, packed = 0, packed_loose = 0, garbage = 0;
- unsigned long loose_size = 0;
+ off_t loose_size = 0;
struct option opts[] = {
OPT__VERBOSE(&verbose),
OPT_END(),
@@ -103,7 +103,7 @@ int cmd_count_objects(int argc, const char **argv, const char *prefix)
if (verbose) {
struct packed_git *p;
unsigned long num_pack = 0;
- unsigned long size_pack = 0;
+ off_t size_pack = 0;
if (!packed_git)
prepare_packed_git();
for (p = packed_git; p; p = p->next) {
@@ -116,15 +116,15 @@ 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 / 1024);
+ printf("size: %lu\n", (unsigned long) (loose_size / 1024));
printf("in-pack: %lu\n", packed);
printf("packs: %lu\n", num_pack);
- printf("size-pack: %lu\n", size_pack / 1024);
+ printf("size-pack: %lu\n", (unsigned long) (size_pack / 1024));
printf("prune-packable: %lu\n", packed_loose);
printf("garbage: %lu\n", garbage);
}
else
printf("%lu objects, %lu kilobytes\n",
- loose, loose_size / 1024);
+ loose, (unsigned long) (loose_size / 1024));
return 0;
}