瀏覽代碼

Send caps when no refs

John Carr 16 年之前
父節點
當前提交
554e8605c9
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      dulwich/server.py

+ 4 - 0
dulwich/server.py

@@ -100,6 +100,7 @@ class Handler(object):
             blob = blob[65530:]
 
     def capabilities(self):
+        # FIXME: Capabilities are different for pushing...
         return "multi_ack side-band-64k thin-pack ofs-delta"
 
     def handshake(self, blob):
@@ -112,6 +113,7 @@ class Handler(object):
             return blob
         blob, caps = blob.split("\x00")
 
+        # FIXME: Do something with this..
         caps = caps.split()
 
         return blob
@@ -193,6 +195,8 @@ class ReceivePackHandler(Handler):
             for i in range(1, len(refs)):
                 ref = refs[i]
                 self.write_pkt_line("%s %s\n" % (ref[1], ref[0]))
+        else:
+            self.write_pkt_line("0000000000000000000000000000000000000000 capabilities^{} %s" % self.capabilities())
 
         self.write("0000")