]> Pileus Git - ~andy/git/commitdiff
Merge branch 'jk/in-pack-size-measurement'
authorJunio C Hamano <gitster@pobox.com>
Thu, 18 Jul 2013 19:59:41 +0000 (12:59 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Jul 2013 19:59:41 +0000 (12:59 -0700)
"git cat-file --batch-check=<format>" is added, primarily to allow
on-disk footprint of objects in packfiles (often they are a lot
smaller than their true size, when expressed as deltas) to be
reported.

* jk/in-pack-size-measurement:
  pack-revindex: radix-sort the revindex
  pack-revindex: use unsigned to store number of objects
  cat-file: split --batch input lines on whitespace
  cat-file: add %(objectsize:disk) format atom
  cat-file: add --batch-check=<format>
  cat-file: refactor --batch option parsing
  cat-file: teach --batch to stream blob objects
  t1006: modernize output comparisons
  teach sha1_object_info_extended a "disk_size" query
  zero-initialize object_info structs

1  2 
cache.h
sha1_file.c

diff --cc cache.h
Simple merge
diff --cc sha1_file.c
index 0af19c00f19b56b23bd7d4ad0f27fdd45cd06d90,6baed676dcf131464806e06c8cdd1f10d5df076d..4c2365f48f7ce361e009d5f4d9323184f6782d34
@@@ -2367,7 -2355,9 +2374,9 @@@ static int sha1_loose_object_info(cons
  
        map = map_sha1_file(sha1, &mapsize);
        if (!map)
 -              return error("unable to find %s", sha1_to_hex(sha1));
 +              return -1;
+       if (disk_sizep)
+               *disk_sizep = mapsize;
        if (unpack_sha1_header(&stream, map, mapsize, hdr, sizeof(hdr)) < 0)
                status = error("unable to unpack %s header",
                               sha1_to_hex(sha1));