fix unimplemented packed_object_info_detail() features

Since commit eb32d236df, there was a TODO
comment in packed_object_info_detail() about the SHA1 of base object to
OBJ_OFS_DELTA objects.  So here it is at last.

While at it, providing the actual storage size information as well is now
trivial.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nicolas Pitre
2008-02-28 00:25:19 -05:00
committed by Junio C Hamano
parent 340814636d
commit 70f5d5d31c
2 changed files with 10 additions and 3 deletions

View 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;