@@ -785,33 +785,59 @@ retrieving the header from a bundle at the indicated URI, and thus
785
785
save themselves and the server(s) the request(s) needed to inspect the
786
786
headers of that bundle or bundles.
787
787
788
- promisor-remote=<pr-infos >
788
+ promisor-remote=<pr-info >
789
789
~~~~~~~~~~~~~~~~~~~~~~~~~~
790
790
791
791
The server may advertise some promisor remotes it is using or knows
792
792
about 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
794
794
form:
795
795
796
- pr-infos = pr-info | pr-infos ";" pr-info
796
+ pr-info = pr-fields | pr-info ";" pr-info
797
797
798
- pr-info = " name=" pr-name | "name=" pr-name "," "url=" pr-url
798
+ pr-fields = field- name " =" field-value | pr-fields "," pr-fields
799
799
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 `field -name` and `field-value` in a given `pr-fields`
801
+ are field names and values related to a single promisor remote.
802
802
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`. The "name" and "url" fields
806
+ MUST appear first in each pr-fields, in that order.
806
807
807
- pr-names = pr-name | pr-names ";" pr-name
808
+ After these mandatory fields, the server MAY advertise the following
809
+ optional fields in any order:
810
+
811
+ - "partialCloneFilter": The filter specification used by the remote.
812
+ Clients can use this to determine if the remote's filtering strategy
813
+ is compatible with their needs (e.g., checking if both use "blob:none").
814
+ It corresponds to the "remote.<name>.partialCloneFilter" config setting.
815
+
816
+ - "token": An authentication token that clients can use when
817
+ connecting to the remote. It corresponds to the "remote.<name>.token"
818
+ config setting.
819
+
820
+ No other fields are defined by the protocol at this time. Clients MUST
821
+ ignore fields they don't recognize to allow for future protocol
822
+ extensions.
823
+
824
+ For now, the client can only use information transmitted through these
825
+ fields to decide if it accepts the advertised promisor remote. In the
826
+ future that information might be used for other purposes though.
827
+
828
+ Field values MUST be urlencoded.
829
+
830
+ If the client decides to use one or more promisor remotes the server
831
+ advertised, it can reply with "promisor-remote=<pr-names>" where
832
+ <pr-names> should be of the form:
833
+
834
+ pr-names = pr-name | pr-names ";" pr-names
808
835
809
836
where `pr-name` is the urlencoded name of a promisor remote the server
810
837
advertised and the client accepts.
811
838
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`.
839
+ Note that, everywhere in this document, the ';' and ',' characters
840
+ MUST be encoded if they appear in `pr-name` or `field-value`.
815
841
816
842
If the server doesn't know any promisor remote that could be good for
817
843
a client to use, or prefers a client not to use any promisor remote it
@@ -822,9 +848,10 @@ In this case, or if the client doesn't want to use any promisor remote
822
848
the server advertised, the client shouldn't advertise the
823
849
"promisor-remote" capability at all in its reply.
824
850
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
851
+ On the server side, the "promisor.advertise" and "promisor.sendFields"
852
+ configuration options can be used to control what it advertises. On
853
+ the client side, the "promisor.acceptFromServer" configuration option
854
+ can be used to control what it accepts. See the documentation of these
828
855
configuration options for more information.
829
856
830
857
Note that in the future it would be nice if the "promisor-remote"
0 commit comments