teach sha1_object_info_extended a "disk_size" query
commit161f00e708874bac646da2ac05c66a18ade2c074
authorJeff King <peff@peff.net>
Sun, 7 Jul 2013 10:04:00 +0000 (7 06:04 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 7 Jul 2013 17:53:22 +0000 (7 10:53 -0700)
tree99762a5def8186ef2a2cbb3c4e8d7d7ffe52dc95
parent7c07385d902f6d8c177d533dc2faa36ef4a52a66
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>
cache.h
sha1_file.c