commit 3fdec683ac6626aac79b13bdfa09114d21917eac from: Jelmer Vernooij via: GitHub date: Wed Apr 05 17:30:51 2023 UTC Merge pull request #1164 from thomasgilgenast/initialize-pack-entry-count initialize pack entry count to 0 in pack.PackStreamCopier.verify() commit - df1660cb6e65b4a211b8f5c8f547293ec65664d0 commit + 3fdec683ac6626aac79b13bdfa09114d21917eac blob - 6dd8ba484fd5d35b923e5307556454df49fdcab1 blob + 58192fae475ba1c8c1ede617d58328a5ec56e778 --- dulwich/pack.py +++ 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)