From bfa014d800c9b0adf012441dfaeefc2f25b261bb Mon Sep 17 00:00:00 2001 From: "Luiz Fernando N. Capitulino" Date: Wed, 29 Aug 2007 17:10:02 -0300 Subject: [PATCH] packv4: nth_packed_object_sha1() packv4 support Signed-off-by: Luiz Fernando N. Capitulino --- sha1_file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sha1_file.c b/sha1_file.c index fb9d41781b..dc9e6a19f0 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1652,9 +1652,12 @@ const unsigned char *nth_packed_object_sha1(struct packed_git *p, index += 4 * 256; if (p->index_version == 1) { return index + 24 * n + 4; - } else { + } else if (p->index_version == 2) { index += 8; return index + 20 * n; + } else { + open_pack_sha1_dict(p); + return p->sha1_dict + 20 * n; } } -- 2.11.4.GIT