aboutsummaryrefslogtreecommitdiff
path: root/Documentation/config
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-09-23 11:53:39 -0700
committerJunio C Hamano <gitster@pobox.com>2025-09-23 11:53:40 -0700
commit2be606a3bd1c916fcc14435556a807c6f5b5ce14 (patch)
tree69ef961c8aef9e834e9aec05c660cc52dd6e5217 /Documentation/config
parentca2559c1d630eb4f04cdee2328aaf1c768907a9e (diff)
parent68a746e9a892f8afa910cdf5c5360dae69193599 (diff)
downloadgit-2be606a3bd1c916fcc14435556a807c6f5b5ce14.tar.xz
Merge branch 'cc/promisor-remote-capability'
The "promisor-remote" capability mechanism has been updated to allow the "partialCloneFilter" settings and the "token" value to be communicated from the server side. * cc/promisor-remote-capability: promisor-remote: use string_list_split() in mark_remotes_as_accepted() promisor-remote: allow a client to check fields promisor-remote: use string_list_split() in filter_promisor_remote() promisor-remote: refactor how we parse advertised fields promisor-remote: use string constants for 'name' and 'url' too promisor-remote: allow a server to advertise more fields promisor-remote: refactor to get rid of 'struct strvec'
Diffstat (limited to 'Documentation/config')
-rw-r--r--Documentation/config/promisor.adoc61
1 files changed, 61 insertions, 0 deletions
diff --git a/Documentation/config/promisor.adoc b/Documentation/config/promisor.adoc
index 2638b01f83..93e5e0d9b5 100644
--- a/Documentation/config/promisor.adoc
+++ b/Documentation/config/promisor.adoc
@@ -9,6 +9,28 @@ promisor.advertise::
"false", which means the "promisor-remote" capability is not
advertised.
+promisor.sendFields::
+ A comma or space separated list of additional remote related
+ field names. A server sends these field names and the
+ associated field values from its configuration when
+ advertising its promisor remotes using the "promisor-remote"
+ capability, see linkgit:gitprotocol-v2[5]. Currently, only the
+ "partialCloneFilter" and "token" field names are supported.
++
+`partialCloneFilter`:: contains the partial clone filter
+used for the remote.
++
+`token`:: contains an authentication token for the remote.
++
+When a field name is part of this list and a corresponding
+"remote.foo.<field-name>" config variable is set on the server to a
+non-empty value, then the field name and value are sent when
+advertising the promisor remote "foo".
++
+This list has no effect unless the "promisor.advertise" config
+variable is set to "true", and the "name" and "url" fields are always
+advertised regardless of this setting.
+
promisor.acceptFromServer::
If set to "all", a client will accept all the promisor remotes
a server might advertise using the "promisor-remote"
@@ -28,3 +50,42 @@ promisor.acceptFromServer::
lazily fetchable from this promisor remote from its responses
to "fetch" and "clone" requests from the client. Name and URL
comparisons are case sensitive. See linkgit:gitprotocol-v2[5].
+
+promisor.checkFields::
+ A comma or space separated list of additional remote related
+ field names. A client checks if the values of these fields
+ transmitted by a server correspond to the values of these
+ fields in its own configuration before accepting a promisor
+ remote. Currently, "partialCloneFilter" and "token" are the
+ only supported field names.
++
+If one of these field names (e.g., "token") is being checked for an
+advertised promisor remote (e.g., "foo"), three conditions must be met
+for the check of this specific field to pass:
++
+1. The corresponding local configuration (e.g., `remote.foo.token`)
+ must be set.
+2. The server must advertise the "token" field for remote "foo".
+3. The value of the locally configured `remote.foo.token` must exactly
+ match the value advertised by the server for the "token" field.
++
+If any of these conditions is not met for any field name listed in
+`promisor.checkFields`, the advertised remote "foo" is rejected.
++
+For the "partialCloneFilter" field, this allows the client to ensure
+that the server's filter matches what it expects locally, preventing
+inconsistencies in filtering behavior. For the "token" field, this can
+be used to verify that authentication credentials match expected
+values.
++
+Field values are compared case-sensitively.
++
+The "name" and "url" fields are always checked according to the
+`promisor.acceptFromServer` policy, independently of this setting.
++
+The field names and values should be passed by the server through the
+"promisor-remote" capability by using the `promisor.sendFields` config
+variable. The fields are checked only if the
+`promisor.acceptFromServer` config variable is not set to "None". If
+set to "None", this config variable has no effect. See
+linkgit:gitprotocol-v2[5].