diff options
author | Jeff King <peff@peff.net> | 2013-07-07 06:04:00 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-07 10:53:22 -0700 |
commit | 161f00e708874bac646da2ac05c66a18ade2c074 (patch) | |
tree | 99762a5def8186ef2a2cbb3c4e8d7d7ffe52dc95 /cache.h | |
parent | zero-initialize object_info structs (diff) | |
download | tgif-161f00e708874bac646da2ac05c66a18ade2c074.tar.xz |
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 { |