Skip to content

Commit

Permalink
add storage size output to 'git verify-pack -v'
Browse files Browse the repository at this point in the history
This can possibly break external scripts that depend on the previous
output, but those script can't possibly be critical to Git usage, and
fixing them should be trivial.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed Mar 1, 2008
1 parent 70f5d5d commit 5f4347b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Documentation/git-verify-pack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ OUTPUT FORMAT
-------------
When specifying the -v option the format used is:

SHA1 type size offset-in-packfile
SHA1 type size size-in-pack-file offset-in-packfile

for objects that are not deltified in the pack, and

SHA1 type size offset-in-packfile depth base-SHA1
SHA1 type size size-in-packfile offset-in-packfile depth base-SHA1

for objects that are deltified.

Expand Down
2 changes: 1 addition & 1 deletion contrib/stats/packinfo.pl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
my @depths;

while (<STDIN>) {
my ($sha1, $type, $size, $offset, $depth, $parent) = split(/\s+/, $_);
my ($sha1, $type, $size, $space, $offset, $depth, $parent) = split(/\s+/, $_);
next unless ($sha1 =~ /^[0-9a-f]{40}$/);
$depths{$sha1} = $depth || 0;
push(@depths, $depth || 0);
Expand Down
8 changes: 4 additions & 4 deletions pack-check.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ static void show_pack_info(struct packed_git *p)
base_sha1);
printf("%s ", sha1_to_hex(sha1));
if (!delta_chain_length)
printf("%-6s %lu %"PRIuMAX"\n",
type, size, (uintmax_t)offset);
printf("%-6s %lu %lu %"PRIuMAX"\n",
type, size, store_size, (uintmax_t)offset);
else {
printf("%-6s %lu %"PRIuMAX" %u %s\n",
type, size, (uintmax_t)offset,
printf("%-6s %lu %lu %"PRIuMAX" %u %s\n",
type, size, store_size, (uintmax_t)offset,
delta_chain_length, sha1_to_hex(base_sha1));
if (delta_chain_length <= MAX_CHAIN)
chain_histogram[delta_chain_length]++;
Expand Down

0 comments on commit 5f4347b

Please sign in to comment.