@@ -785,33 +785,64 @@ 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 >
789
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
788
+ promisor-remote=<pr-info >
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-fields
797
797
798
- pr-info = "name=" pr-name | "name=" pr-name "," "url=" pr-url
798
+ pr-fields = pr-field | pr-fields "," pr-field
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
+ pr-field = field-name "=" field-value
802
801
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:
802
+ where all the `field-name` and `field-value` in a given `pr-fields`
803
+ are field names and values related to a single promisor remote. A
804
+ given `field-name` MUST NOT appear more than once in given
805
+ `pr-fields`.
806
+
807
+ The server MUST advertise at least the "name" and "url" field names
808
+ along with the associated field values, which are the name of a valid
809
+ remote and its URL, in each `pr-fields`. The "name" and "url" fields
810
+ MUST appear first in each pr-fields, in that order.
811
+
812
+ After these mandatory fields, the server MAY advertise the following
813
+ optional fields in any order:
814
+
815
+ `partialCloneFilter`:: The filter specification used by the remote.
816
+ Clients can use this to determine if the remote's filtering strategy
817
+ is compatible with their needs (e.g., checking if both use "blob:none").
818
+ It corresponds to the "remote.<name>.partialCloneFilter" config setting.
819
+
820
+ `token`:: An authentication token that clients can use when
821
+ connecting to the remote. It corresponds to the "remote.<name>.token"
822
+ config setting.
823
+
824
+ No other fields are defined by the protocol at this time. Field names
825
+ are case-sensitive and MUST be transmitted exactly as specified
826
+ above. Clients MUST ignore fields they don't recognize to allow for
827
+ future protocol extensions.
828
+
829
+ For now, the client can only use information transmitted through these
830
+ fields to decide if it accepts the advertised promisor remote. In the
831
+ future that information might be used for other purposes though.
832
+
833
+ Field values MUST be urlencoded.
834
+
835
+ If the client decides to use one or more promisor remotes the server
836
+ advertised, it can reply with "promisor-remote=<pr-names>" where
837
+ <pr-names> should be of the form:
806
838
807
839
pr-names = pr-name | pr-names ";" pr-name
808
840
809
841
where `pr-name` is the urlencoded name of a promisor remote the server
810
842
advertised and the client accepts.
811
843
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`.
844
+ Note that, everywhere in this document, the ';' and ',' characters
845
+ MUST be encoded if they appear in `pr-name` or `field-value`.
815
846
816
847
If the server doesn't know any promisor remote that could be good for
817
848
a client to use, or prefers a client not to use any promisor remote it
@@ -822,9 +853,10 @@ In this case, or if the client doesn't want to use any promisor remote
822
853
the server advertised, the client shouldn't advertise the
823
854
"promisor-remote" capability at all in its reply.
824
855
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
856
+ On the server side, the "promisor.advertise" and "promisor.sendFields"
857
+ configuration options can be used to control what it advertises. On
858
+ the client side, the "promisor.acceptFromServer" configuration option
859
+ can be used to control what it accepts. See the documentation of these
828
860
configuration options for more information.
829
861
830
862
Note that in the future it would be nice if the "promisor-remote"
0 commit comments