]> git.ipfire.org Git - thirdparty/git.git/commit
promisor-remote: introduce promisor.acceptFromServerUrl
authorChristian Couder <christian.couder@gmail.com>
Wed, 27 May 2026 14:08:17 +0000 (16:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 May 2026 20:20:15 +0000 (05:20 +0900)
commit78e0d9b0e4649659cc38545450174d293cb1ec0c
treec8a6e6d8935811d48ae69026ac3b08c52e6af636
parent53951298515ad26728175182c9103eea71885220
promisor-remote: introduce promisor.acceptFromServerUrl

The "promisor-remote" protocol capability allows servers to advertise
promisor remotes, but doesn't allow these remotes to be automatically
configured on the client.

Let's introduce a new `promisor.acceptFromServerUrl` config variable
which contains a glob pattern, so that advertised remotes with a URL
matching that pattern will be automatically configured.

The glob pattern can optionally be prefixed with a remote name which
will be used as the name of the new local remote.

For now though, let's only introduce the functions to read and validate
the glob patterns and the optional prefixes.

Checking if the URLs of the advertised remotes match the glob patterns
and taking the appropriate action is left for a following commit.

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