瀏覽代碼

initialize pack entry count to 0 in pack.verify()

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

+ 1 - 0
dulwich/pack.py

@@ -1059,6 +1059,7 @@ class PackStreamCopier(PackStreamReader):
         See PackStreamReader.iterobjects for a list of exceptions this may
         throw.
         """
+        i = 0  # default count of entries if read_objects() is empty
         for i, unpacked in enumerate(self.read_objects()):
             if self._delta_iter:
                 self._delta_iter.record(unpacked)