]> git.ipfire.org Git - thirdparty/git.git/commit
promisor-remote: check advertised name or URL
authorChristian Couder <christian.couder@gmail.com>
Tue, 18 Feb 2025 11:32:03 +0000 (12:32 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Feb 2025 19:05:37 +0000 (11:05 -0800)
commit36463e32dfef16dc3a903763f14f5bbf6e0248e7
tree65e053ffc7bc35376aeba7651c15f1f7d20fb6f1
parentd460267613da14eba959eb225e2cbf6a1e132eb1
promisor-remote: check advertised name or URL

A previous commit introduced a "promisor.acceptFromServer" configuration
variable with only "None" or "All" as valid values.

Let's introduce "KnownName" and "KnownUrl" as valid values for this
configuration option to give more choice to a client about which
promisor remotes it might accept among those that the server advertised.

In case of "KnownName", the client will accept promisor remotes which
are already configured on the client and have the same name as those
advertised by the client. This could be useful in a corporate setup
where servers and clients are trusted to not switch names and URLs, but
where some kind of control is still useful.

In case of "KnownUrl", the client will accept promisor remotes which
have both the same name and the same URL configured on the client as the
name and URL advertised by the server. This is the most secure option,
so it should be used if possible.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/promisor.adoc
promisor-remote.c
t/t5710-promisor-remote-capability.sh