Explorar o código

Merge pull request #1164 from thomasgilgenast/initialize-pack-entry-count

initialize pack entry count to 0 in pack.PackStreamCopier.verify()
Jelmer Vernooij %!s(int64=2) %!d(string=hai) anos
pai
achega
3fdec683ac
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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)