bundle-uri: add support for http(s):// and file://
commit59c1752ab6768cb9c380f0a7c9d06af79d183f67
authorDerrick Stolee <derrickstolee@github.com>
Tue, 9 Aug 2022 13:11:42 +0000 (9 13:11 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Aug 2022 21:07:37 +0000 (10 14:07 -0700)
tree160d8560e87bd9d0426b9f45155340b8e6b675b9
parent55568919616429fbc209880cf189a3adaceb6093
bundle-uri: add support for http(s):// and file://

The previous change created the 'git clone --bundle-uri=<uri>' option.
Currently, <uri> must be a filename.

Update copy_uri_to_file() to first inspect the URI for an HTTP(S) prefix
and use git-remote-https as the way to download the data at that URI.
Otherwise, check to see if file:// is present and modify the prefix
accordingly.

Reviewed-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bundle-uri.c
t/t5558-clone-bundle-uri.sh