Browse Source

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

Thomas Gilgenast 2 years ago
parent
commit
d972898e9a
1 changed files with 1 additions and 0 deletions
  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)