summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b798671)
raw | patch | inline | side by side (parent: b798671)
author | Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> | |
Tue, 14 Aug 2007 19:42:37 +0000 (16:42 -0300) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 15 Aug 2007 05:20:13 +0000 (22:20 -0700) |
Print the index version when an error occurs so the user
knows what type of header (and size) we thought the index
should have had.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
knows what type of header (and size) we thought the index
should have had.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c | patch | blob | history |
diff --git a/sha1_file.c b/sha1_file.c
index aca741b79ce3cdc28f0eb5bdc6848ddba6da8f35..b219d4d5f246eef13c3fe22cd39497b621d7cc4b 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
*/
if (idx_size != 4*256 + nr * 24 + 20 + 20) {
munmap(idx_map, idx_size);
- return error("wrong index file size in %s", path);
+ return error("wrong index v1 file size in %s", path);
}
} else if (version == 2) {
/*
max_size += (nr - 1)*8;
if (idx_size < min_size || idx_size > max_size) {
munmap(idx_map, idx_size);
- return error("wrong index file size in %s", path);
+ return error("wrong index v2 file size in %s", path);
}
if (idx_size != min_size) {
/* make sure we can deal with large pack offsets */