diff options
author | Derrick Stolee <derrickstolee@github.com> | 2022-08-09 13:11:39 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-08-10 14:07:37 -0700 |
commit | b5624a44744d6e5f9c749e4df02932c724e2097e (patch) | |
tree | 550bb596d7bb2c39621d2d99aa7d7007b98a203b /Documentation/gitremote-helpers.txt | |
parent | 6a475b71f8c4ce708d69fdc9317aefbde3769e25 (diff) | |
download | git-b5624a44744d6e5f9c749e4df02932c724e2097e.tar.gz |
remote-curl: add 'get' capability
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>.
Reviewed-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/gitremote-helpers.txt')
-rw-r--r-- | Documentation/gitremote-helpers.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/gitremote-helpers.txt b/Documentation/gitremote-helpers.txt index 6f1e269ae4..ed8da428c9 100644 --- a/Documentation/gitremote-helpers.txt +++ b/Documentation/gitremote-helpers.txt @@ -168,6 +168,9 @@ Supported commands: 'list', 'import'. Can guarantee that when a clone is requested, the received pack is self contained and is connected. +'get':: + Can use the 'get' command to download a file from a given URI. + If a helper advertises 'connect', Git will use it if possible and fall back to another capability if the helper requests so when connecting (see the 'connect' command under COMMANDS). @@ -418,6 +421,12 @@ Supported if the helper has the "connect" capability. + Supported if the helper has the "stateless-connect" capability. +'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. + If a fatal error occurs, the program writes the error message to stderr and exits. The caller should expect that a suitable error message has been printed if the child closes the connection without |