From 2cae2611bfe6b21aeac242d0a9bc3da4606c2066 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 26 Nov 2013 02:30:08 +0000 Subject: [PATCH] Pass in known sha. --- dulwich/pack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dulwich/pack.py b/dulwich/pack.py index b2e47fc37..fd72f7a1d 100644 --- a/dulwich/pack.py +++ b/dulwich/pack.py @@ -1859,7 +1859,7 @@ def get_raw(self, sha1): def __getitem__(self, sha1): """Retrieve the specified SHA1.""" type, uncomp = self.get_raw(sha1) - return ShaFile.from_raw_string(type, uncomp) + return ShaFile.from_raw_string(type, uncomp, sha=sha1) def iterobjects(self): """Iterate over the objects in this pack."""