浏览代码

Upload pack: We have to wait for the client to close the connection by itself.

Most versions of Git freakout if we close the connection ourselves,
and will not create an empty repository on clone.
Damien Tournoud 11 年之前
父节点
当前提交
4f16a58ec6
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 0 4
      dulwich/server.py

+ 0 - 4
dulwich/server.py

@@ -411,10 +411,6 @@ class ProtocolGraphWalker(object):
         :param heads: a dict of refname->SHA1 to advertise
         :param heads: a dict of refname->SHA1 to advertise
         :return: a list of SHA1s requested by the client
         :return: a list of SHA1s requested by the client
         """
         """
-        if not heads:
-            # The repo is empty, so short-circuit the whole process.
-            self.proto.write_pkt_line(None)
-            return []
         values = set(heads.itervalues())
         values = set(heads.itervalues())
         if self.advertise_refs or not self.http_req:
         if self.advertise_refs or not self.http_req:
             for i, (ref, sha) in enumerate(sorted(heads.iteritems())):
             for i, (ref, sha) in enumerate(sorted(heads.iteritems())):