If your Git repository remote hosting service used Git 2.38+ (Q3 2022), it would implement a "get" capability:
See commit 65da938 (23 Aug 2022), and commit e21e663, commit 59c1752, commit 5556891, commit 53a5089, commit b5624a4 (09 Aug 2022) by Derrick Stolee (derrickstolee
).
(Merged by Junio C Hamano -- gitster
-- in commit 68ef042, 01 Sep 2022)
Reviewed-by: Josh Steadmon
Signed-off-by: Derrick Stolee
A future change will want a way to download a file over HTTP(S) using the simplest of download mechanisms.
We do not want to assume that the server on the other side understands anything about the Git protocol but could be a simple static web server.
Create the new 'get' capability for the remote helpers which advertises that the 'get
' command is avalable.
A caller can send a line containing 'get <url> <path>
' to download the file at <url>
into the file at <path>
.
gitremote-helpers
now includes in its man page:
'get'
Can use the 'get' command to download a file from a given URI.
gitremote-helpers
now includes in its man page:
'get' <uri> <path>
Downloads the file from the given <uri>
to the given <path>
.
If
<path>.temp
exists, then Git assumes that the .temp
file is a
partial download from a previous attempt and will resume the
download from that position.