From: Junio C Hamano Date: Sun, 11 Mar 2007 07:10:26 +0000 (-0800) Subject: Merge branch 'jc/fsck' X-Git-Tag: v1.5.1-rc1~63 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8509fed75d576023f5f2db8542fad102fcc62d4d;p=git.git Merge branch 'jc/fsck' * jc/fsck: fsck: exit with non-zero status upon errors unpack_sha1_file(): detect corrupt loose object files. fsck: fix broken loose object check. --- 8509fed75d576023f5f2db8542fad102fcc62d4d diff --cc sha1_file.c index 219a10f40,ac6b5e00b..7faa8bcd5 --- a/sha1_file.c +++ b/sha1_file.c @@@ -1050,17 -1050,17 +1061,17 @@@ static void *unpack_sha1_file(void *map if (ret < Z_OK || (*type = parse_sha1_header(hdr, size)) < 0) return NULL; - return unpack_sha1_rest(&stream, hdr, *size); + return unpack_sha1_rest(&stream, hdr, *size, sha1); } -static unsigned long get_delta_base(struct packed_git *p, +static off_t get_delta_base(struct packed_git *p, struct pack_window **w_curs, - unsigned long *curpos, + off_t *curpos, enum object_type type, - unsigned long delta_obj_offset) + off_t delta_obj_offset) { unsigned char *base_info = use_pack(p, w_curs, *curpos, NULL); - unsigned long base_offset; + off_t base_offset; /* use_pack() assured us we have [base_info, base_info + 20) * as a range that we can look at without walking off the