Browse Source

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

Thomas Gilgenast 2 năm trước cách đây
mục cha
commit
d972898e9a
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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)