]> git.ipfire.org Git - thirdparty/git.git/commit - t/t5750-bundle-uri-parse.sh
bundle-uri: allow relative URLs in bundle lists
authorDerrick Stolee <derrickstolee@github.com>
Thu, 22 Dec 2022 15:14:15 +0000 (15:14 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 25 Dec 2022 07:24:24 +0000 (16:24 +0900)
commitebc39479558fb4893c72a35065e6792515acef86
tree5db1e885215a171f3ed8dc63d5ee6d89b74a9dbf
parent9ea57964953dec11dcbbd5d4bf44a5e3781f5880
bundle-uri: allow relative URLs in bundle lists

Bundle providers may want to distribute that data across multiple CDNs.
This might require a change in the base URI, all the way to the domain
name. If all bundles require an absolute URI in their 'uri' value, then
every push to a CDN would require altering the table of contents to
match the expected domain and exact location within it.

Allow a bundle list to specify a relative URI for the bundles. This URI
is based on where the client received the bundle list. For a list
provided in the 'bundle-uri' protocol v2 command, the Git remote URI is
the base URI. Otherwise, the bundle list was provided from an HTTP URI
not using the Git protocol, and that URI is the base URI. This allows
easier distribution of bundle data.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bundle-uri.c
bundle-uri.h
t/helper/test-bundle-uri.c
t/t5750-bundle-uri-parse.sh
transport.c