Use standard buffer size rather than object size.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 1 Apr 2010 16:58:09 +0000 (18:58 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 1 Apr 2010 16:58:09 +0000 (18:58 +0200)
dulwich/pack.py

index 18a96ac4dc6047a547c1a15f3f9485b87456e8f0..97c9ba5baf9863b2a177d79afc48c64e18278f22 100644 (file)
@@ -427,17 +427,17 @@ def unpack_object(read):
             delta_base_offset += 1
             delta_base_offset <<= 7
             delta_base_offset += (byte & 0x7f)
-        uncomp, comp_len, unused = read_zlib_chunks(read, size)
+        uncomp, comp_len, unused = read_zlib_chunks(read)
         assert size == chunks_length(uncomp)
         return type, (delta_base_offset, uncomp), comp_len+raw_base, unused
     elif type == 7: # ref delta
         basename = read(20)
         raw_base += 20
-        uncomp, comp_len, unused = read_zlib_chunks(read, size)
+        uncomp, comp_len, unused = read_zlib_chunks(read)
         assert size == chunks_length(uncomp)
         return type, (basename, uncomp), comp_len+raw_base, unused
     else:
-        uncomp, comp_len, unused = read_zlib_chunks(read, size)
+        uncomp, comp_len, unused = read_zlib_chunks(read)
         assert chunks_length(uncomp) == size
         return type, uncomp, comp_len+raw_base, unused