Dulwich.io dulwich / 9d73c23
Fix issue #247 'TypeError when fetching empty updates into MemoryRepo' by adding check for _num_objects is None when iterating pack data. Hwee Miin Koh authored 4 years ago Jelmer Vernooij committed 4 years ago
2 changed file(s) with 9 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
10931093 # TODO(dborowitz): Merge this with iterobjects, if we can change its
10941094 # return type.
10951095 self._file.seek(self._header_size)
1096
1097 if self._num_objects is None:
1098 return
1099
10961100 for _ in xrange(self._num_objects):
10971101 offset = self._file.tell()
10981102 unpacked, unused = unpack_object(
212212 raise
213213 else:
214214 commit()
215
216 def test_add_pack_emtpy(self):
217 o = MemoryObjectStore()
218 f, commit, abort = o.add_pack()
219 commit()
215220
216221 def test_add_thin_pack(self):
217222 o = MemoryObjectStore()