Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'unpack-objects.c')
-rw-r--r--unpack-objects.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/unpack-objects.c b/unpack-objects.c
index 91a71c55c6..a792b92ece 100644
--- a/unpack-objects.c
+++ b/unpack-objects.c
@@ -74,9 +74,10 @@ static int check_index(void)
* Total size:
* - 256 index entries 4 bytes each
* - 24-byte entries * nr (20-byte sha1 + 4-byte offset)
+ * - 20-byte SHA1 of the packfile
* - 20-byte SHA1 file checksum
*/
- if (index_size != 4*256 + nr * 24 + 20)
+ if (index_size != 4*256 + nr * 24 + 20 + 20)
return error("wrong index file size");
nr_entries = nr;