From c10c1a37a6ea2b92cc150f2b3fb5a8cd4782795b Mon Sep 17 00:00:00 2001 From: "Luiz Fernando N. Capitulino" Date: Sun, 12 Aug 2007 14:53:51 -0300 Subject: [PATCH] open_pack_sha1_dict(): Do not try to open the packfile twice Signed-off-by: Luiz Fernando N. Capitulino --- sha1_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sha1_file.c b/sha1_file.c index 357f376350..3099f75c5e 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -724,7 +724,7 @@ static void open_pack_sha1_dict(struct packed_git *p) unsigned char *dict; const size_t offset = sizeof(struct pack_header); - if (open_packed_git(p)) + if (p->pack_fd < 0 && open_packed_git(p)) die("Could not open pack file"); dict = xmmap(NULL, offset + p->num_objects * 20, PROT_READ, -- 2.11.4.GIT