summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-03-19 19:15:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-03-19 19:15:14 (GMT)
commit865e99b5fde9a9128b34b6f3805f726c7a3b1b13 (patch)
treef35be308ff031c12ae41387a4bd6e6773678a96d /read-cache.c
parentf944ec9aa53d22fb1d2f4e0b2974eb90c0cf3a15 (diff)
parent647d87947f8248df5608f621ece8b1dc875fa859 (diff)
downloadgit-865e99b5fde9a9128b34b6f3805f726c7a3b1b13.zip
git-865e99b5fde9a9128b34b6f3805f726c7a3b1b13.tar.gz
git-865e99b5fde9a9128b34b6f3805f726c7a3b1b13.tar.bz2
Merge branch 'nd/doc-index-format'
Update the index format documentation to mention the v4 format. * nd/doc-index-format: update-index: list supported idx versions and their features read-cache.c: use INDEX_FORMAT_{LB,UB} in verify_hdr() index-format.txt: mention of v4 is missing in some places
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c
index 827ae55..670a06b 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1260,7 +1260,7 @@ static int verify_hdr(struct cache_header *hdr, unsigned long size)
if (hdr->hdr_signature != htonl(CACHE_SIGNATURE))
return error("bad signature");
hdr_version = ntohl(hdr->hdr_version);
- if (hdr_version < 2 || 4 < hdr_version)
+ if (hdr_version < INDEX_FORMAT_LB || INDEX_FORMAT_UB < hdr_version)
return error("bad index version %d", hdr_version);
git_SHA1_Init(&c);
git_SHA1_Update(&c, hdr, size - 20);