X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=index-pack.c;h=babe34b2db520a311d6c8ef090383755ba1807c9;hb=c150462824008957f568ca7aa05a65b35d860eb9;hp=541d7bc1c1723c1a41cd35349b607223c94a4dca;hpb=e5f5219a4f1faf3b4e1816fad3a6296a1d39b878;p=git.git diff --git a/index-pack.c b/index-pack.c index 541d7bc1..babe34b2 100644 --- a/index-pack.c +++ b/index-pack.c @@ -68,9 +68,9 @@ static void parse_pack_header(void) hdr = (void *)pack_base; if (hdr->hdr_signature != htonl(PACK_SIGNATURE)) die("packfile '%s' signature mismatch", pack_name); - if (hdr->hdr_version != htonl(PACK_VERSION)) - die("packfile '%s' version %d different from ours %d", - pack_name, ntohl(hdr->hdr_version), PACK_VERSION); + if (!pack_version_ok(hdr->hdr_version)) + die("packfile '%s' version %d unsupported", + pack_name, ntohl(hdr->hdr_version)); nr_objects = ntohl(hdr->hdr_entries);