Quellcode durchsuchen

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 vor 2 Monaten
Ursprung
Commit
b554b0f33d
1 geänderte Dateien mit 0 neuen und 2 gelöschten Zeilen
  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)