X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=sha1_file.c;h=895c1fab6fc00b8131e44851f33b79b1d2310b12;hb=b23f02ee7aa3fc1cdaf6aebde9b731f22671251b;hp=fe374c6132a74641959e201f8c03dd9952e9acee;hpb=d710b2655c72f37f3d065b2c8c93e022f596d460;p=git.git diff --git a/sha1_file.c b/sha1_file.c index fe374c61..895c1fab 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -20,6 +20,8 @@ #endif #endif +const unsigned char null_sha1[20] = { 0, }; + static unsigned int sha1_file_open_flag = O_NOATIME; static unsigned hexval(char c) @@ -871,7 +873,8 @@ void packed_object_info_detail(struct pack_entry *e, strcpy(type, "tag"); break; default: - die("corrupted pack file"); + die("corrupted pack file %s containing object of kind %d", + p->pack_name, kind); } *store_size = 0; /* notyet */ } @@ -910,7 +913,8 @@ static int packed_object_info(struct pack_entry *entry, strcpy(type, "tag"); break; default: - die("corrupted pack file"); + die("corrupted pack file %s containing object of kind %d", + p->pack_name, kind); } if (sizep) *sizep = size; @@ -1010,7 +1014,7 @@ static void *unpack_entry(struct pack_entry *entry, retval = unpack_entry_gently(entry, type, sizep); unuse_packed_git(p); if (!retval) - die("corrupted pack file"); + die("corrupted pack file %s", p->pack_name); return retval; }