pull --rebase: exit early when the working directory is dirty
[gitweb.git] / pack-check.c
index d7dd62bb8346c4cac8dbd7334e999a450c21c5ab..0f8ad2c00f21d9a0a64b541ed95fff91650d7175 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "pack.h"
+#include "pack-revindex.h"
 
 struct idx_entry
 {
@@ -101,8 +102,10 @@ static int verify_packfile(struct packed_git *p,
 static void show_pack_info(struct packed_git *p)
 {
        uint32_t nr_objects, i, chain_histogram[MAX_CHAIN+1];
+
        nr_objects = p->num_objects;
        memset(chain_histogram, 0, sizeof(chain_histogram));
+       init_pack_revindex();
 
        for (i = 0; i < nr_objects; i++) {
                const unsigned char *sha1;
@@ -125,11 +128,11 @@ static void show_pack_info(struct packed_git *p)
                                                 base_sha1);
                printf("%s ", sha1_to_hex(sha1));
                if (!delta_chain_length)
-                       printf("%-6s %lu %"PRIuMAX"\n",
-                              type, size, (uintmax_t)offset);
+                       printf("%-6s %lu %lu %"PRIuMAX"\n",
+                              type, size, store_size, (uintmax_t)offset);
                else {
-                       printf("%-6s %lu %"PRIuMAX" %u %s\n",
-                              type, size, (uintmax_t)offset,
+                       printf("%-6s %lu %lu %"PRIuMAX" %u %s\n",
+                              type, size, store_size, (uintmax_t)offset,
                               delta_chain_length, sha1_to_hex(base_sha1));
                        if (delta_chain_length <= MAX_CHAIN)
                                chain_histogram[delta_chain_length]++;