Browse Source

More stuff needed for pack writing

John Carr 16 năm trước cách đây
mục cha
commit
2a52faae42
2 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 2 2
      bin/dul-daemon
  2. 1 0
      dulwich/objects.py

+ 2 - 2
bin/dul-daemon

@@ -106,9 +106,9 @@ class GitBackend(Backend):
         w.write(struct.pack(">L", 2))
         w.write(struct.pack(">L", len(sha_queue)))
 
-        for type, sha in sha_queue:
+        for t, sha in sha_queue:
             obj = self.repo.get_object(sha)
-            write_pack_object(w, type, object)
+            write_pack_object(w, t, obj)
 
         # send sha1 of pack
         write(w.digest())

+ 1 - 0
dulwich/objects.py

@@ -149,6 +149,7 @@ class ShaFile(object):
     obj._num_type = type
     obj._text = string
     obj._update_contents()
+    obj._parse_text()
     return obj
 
   def _header(self):