Procházet zdrojové kódy

Commit minor things otu of the way first

- Some comments on trying to wrap my way around while untangling this
  mess
- Also minor indentation fix.
Tommy Yu před 10 roky
rodič
revize
8fb36f71db
2 změnil soubory, kde provedl 8 přidání a 0 odebrání
  1. 3 0
      dulwich/repo.py
  2. 5 0
      dulwich/server.py

+ 3 - 0
dulwich/repo.py

@@ -263,6 +263,9 @@ class BaseRepo(object):
 
             return []
 
+        # If the graph walker is set up with an implementation that can
+        # ACK/NAK to the wire, it will write data to the client through
+        # this call as a side-effect.
         haves = self.object_store.find_common_revisions(graph_walker)
 
         # Deal with shallow requests separately because the haves do

+ 5 - 0
dulwich/server.py

@@ -725,6 +725,11 @@ class MultiAckDetailedGraphWalkerImpl(object):
             if command is None:
                 self.walker.send_nak()
                 if self.walker.http_req:
+                    # why special case?  if this was "stateless" as in
+                    # HTTP there would be nothing left to be read and
+                    # None would have returned later... so I guess this
+                    # is a short circuit (also to make the test case
+                    # as written happy).
                     return None
                 continue
             elif command == COMMAND_DONE: