Bläddra i källkod

docs/tutorial: document depth kwarg in determine_wants

Peter Rowlands 4 år sedan
förälder
incheckning
fdfa900596
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. 4 1
      docs/tutorial/remote.txt

+ 4 - 1
docs/tutorial/remote.txt

@@ -41,10 +41,13 @@ The client object can then be used to retrieve a pack. The ``fetch_pack``
 method takes a ``determine_wants`` callback argument, which allows the
 method takes a ``determine_wants`` callback argument, which allows the
 client to determine which objects it wants to end up with::
 client to determine which objects it wants to end up with::
 
 
-   >>> def determine_wants(refs):
+   >>> def determine_wants(refs, depth=None):
    ...    # retrieve all objects
    ...    # retrieve all objects
    ...    return refs.values()
    ...    return refs.values()
 
 
+Note that the ``depth`` keyword argument will contain an optional requested
+shallow fetch depth.
+
 Another required object is a "graph walker", which is used to determine
 Another required object is a "graph walker", which is used to determine
 which objects that the client already has should not be sent again
 which objects that the client already has should not be sent again
 by the server. Here in the tutorial we'll just use a dummy graph walker
 by the server. Here in the tutorial we'll just use a dummy graph walker