From 161f00e708874bac646da2ac05c66a18ade2c074 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sun, 7 Jul 2013 06:04:00 -0400 Subject: teach sha1_object_info_extended a "disk_size" query Using sha1_object_info_extended, a caller can find out the type of an object, its size, and information about where it is stored. In addition to the object's "true" size, it can also be useful to know the size that the object takes on disk (e.g., to generate statistics about which refs consume space). This patch adds a "disk_sizep" field to "struct object_info", and fills it in during sha1_object_info_extended if it is non-NULL. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 94ca1acf70..f2915509a6 100644 --- a/cache.h +++ b/cache.h @@ -1099,6 +1099,7 @@ extern int unpack_object_header(struct packed_git *, struct pack_window **, off_ struct object_info { /* Request */ unsigned long *sizep; + unsigned long *disk_sizep; /* Response */ enum { -- cgit v1.2.3