From: Junio C Hamano Date: Thu, 18 Jul 2013 19:59:41 +0000 (-0700) Subject: Merge branch 'jk/in-pack-size-measurement' X-Git-Tag: v1.8.4-rc0~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=802f878b86332a7841dab89dfe29e3e6c90979ab;p=thirdparty%2Fgit.git Merge branch 'jk/in-pack-size-measurement' "git cat-file --batch-check=" 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= 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 --- 802f878b86332a7841dab89dfe29e3e6c90979ab diff --cc sha1_file.c index 0af19c00f1,6baed676dc..4c2365f48f --- a/sha1_file.c +++ b/sha1_file.c @@@ -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));