[RFC/PATCH 0/4] cat-file --batch-disk-sizes
- From
Jeff King <peff@peff.net>
- Date
- Jul 7, 2013, 10:01 UTC
- Message-ID
- <20130707100133.GA18717@sigill.intra.peff.net>
When I work with alternates repositories that have the objects for many individual forks inter-mixed, one of the questions I want to ask git is how much space particular forks are taking up in the object database. This is easy enough to script with `rev-list --objects $fork1 --not $fork2`, as long as you can convert the object names into their on-disk sizes.
Unfortunately, it's hard to get the on-disk object sizes for packs. You can do it directly with `verify-pack -v`, which is incredibly slow. Or you can sort and subtract offsets from the output of `show-index` (i.e., the same thing the pack-revindex code does internally). Instead, this patch series exposes the revindex-generated sizes on the command line.
The fourth patch does not need to be built on top of this series, but the early parts provide a convenient way to measure the revindex code.
[1/4]: zero-initialize object_info structs [2/4]: teach sha1_object_info_extended a "disk_size" query [3/4]: cat-file: add --batch-disk-sizes option [4/4]: pack-revindex: radix-sort the revindex
-Peff