瀏覽代碼

protov2: avoid writing a flush packet directly after the 'deepen' command

The 'deepen' command will be followed by further commands, most importantly
the 'done' command. If a server implementation stops reading after the flush
packet then the 'done' command will be missed, and pack negotiation will fail.

Observed with JGit which will send 'acknowledgment', waiting for more wants
or a 'done' command to arrive. Fixes issue #1561
Stefan Sperling 2 月之前
父節點
當前提交
b554b0f33d
共有 1 個文件被更改,包括 0 次插入2 次删除
  1. 0 2
      dulwich/client.py

+ 0 - 2
dulwich/client.py

@@ -609,8 +609,6 @@ def _handle_upload_pack_head(
             proto.write_pkt_line(
                 COMMAND_DEEPEN + b" " + str(depth).encode("ascii") + b"\n"
             )
-        if protocol_version == 2:
-            proto.write_pkt_line(None)
     if protocol_version != 2:
         proto.write_pkt_line(None)