瀏覽代碼

More stuff needed for pack writing

John Carr 16 年之前
父節點
當前提交
2a52faae42
共有 2 個文件被更改,包括 3 次插入2 次删除
  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):