@@ -785,33 +785,52 @@ retrieving the header from a bundle at the indicated URI, and thus
785785save themselves and the server(s) the request(s) needed to inspect the
786786headers of that bundle or bundles.
787787
788- promisor-remote=<pr-infos >
788+ promisor-remote=<pr-info >
789789~~~~~~~~~~~~~~~~~~~~~~~~~~
790790
791791The server may advertise some promisor remotes it is using or knows
792792about to a client which may want to use them as its promisor remotes,
793- instead of this repository. In this case <pr-infos > should be of the
793+ instead of this repository. In this case <pr-info > should be of the
794794form:
795795
796- pr-infos = pr-info | pr-infos ";" pr-info
796+ pr-info = pr-fields | pr-info ";" pr-info
797797
798- pr-info = " name=" pr-name | "name=" pr-name "," "url=" pr-url
798+ pr-fields = fld- name " =" fld-value | pr-fields "," pr-fields
799799
800- where `pr -name` is the urlencoded name of a promisor remote, and
801- `pr-url` the urlencoded URL of that promisor remote.
800+ where all the `fld -name` and `fld-value` in a given `pr-fields` are
801+ field names and values related to a single promisor remote.
802802
803- In this case, if the client decides to use one or more promisor
804- remotes the server advertised, it can reply with
805- "promisor- remote=<pr-names>" where <pr-names> should be of the form:
803+ The server MUST advertise at least the "name" and "url" field names
804+ along with the associated field values, which are the name of a valid
805+ remote and its URL, in each `pr-fields`.
806806
807- pr-names = pr-name | pr-names ";" pr-name
807+ The server MAY advertise the following optional fields:
808+
809+ - "partialCloneFilter": Filter used for partial clone, corresponding
810+ to the "remote.<name>.partialCloneFilter" config setting.
811+ - "token": Authentication token for the remote, corresponding
812+ to the "remote.<name>.token" config setting.
813+
814+ No other fields are defined by the protocol at this time. Clients SHOULD
815+ ignore fields they don't recognize to allow for future protocol extensions.
816+
817+ For now, the client can only use information transmitted through these
818+ fields to decide if it accepts the advertised promisor remote. In the
819+ future that information might be used for other purposes though.
820+
821+ Field values MUST be urlencoded.
822+
823+ If the client decides to use one or more promisor remotes the server
824+ advertised, it can reply with "promisor-remote=<pr-names>" where
825+ <pr-names> should be of the form:
826+
827+ pr-names = pr-name | pr-names ";" pr-names
808828
809829where `pr-name` is the urlencoded name of a promisor remote the server
810830advertised and the client accepts.
811831
812- Note that, everywhere in this document, `pr-name` MUST be a valid
813- remote name, and the ';' and ',' characters MUST be encoded if they
814- appear in `pr-name` or `pr-url`.
832+ Note that, everywhere in this document, the ';' and ',' characters
833+ MUST be encoded if they appear in `pr-name` or `fld-value`.
815834
816835If the server doesn't know any promisor remote that could be good for
817836a client to use, or prefers a client not to use any promisor remote it
@@ -822,9 +841,10 @@ In this case, or if the client doesn't want to use any promisor remote
822841the server advertised, the client shouldn't advertise the
823842"promisor-remote" capability at all in its reply.
824843
825- The "promisor.advertise" and "promisor.acceptFromServer" configuration
826- options can be used on the server and client side to control what they
827- advertise or accept respectively. See the documentation of these
844+ On the server side, the "promisor.advertise" and "promisor.sendFields"
845+ configuration options can be used to control what it advertises. On
846+ the client side, the "promisor.acceptFromServer" configuration option
847+ can be used to control what it accepts. See the documentation of these
828848configuration options for more information.
829849
830850Note that in the future it would be nice if the "promisor-remote"
0 commit comments