瀏覽代碼

Pass in known sha.

Jelmer Vernooij 11 年之前
父節點
當前提交
2cae2611bf
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      dulwich/pack.py

+ 1 - 1
dulwich/pack.py

@@ -1859,7 +1859,7 @@ class Pack(object):
     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."""