PR-2429 has implemented a mechanism to unconditionally specify
standalone custom transfer agents.
This commit extends the mechanism to specify custom transfer agents
based on an URL prefix match on the API URL.
Together with the previous commit, which added the Git remote to the
custom transfer stage 1 initiation message, standalone custom transfer
can now be configured per remote. One remote can, for example, use
Rsync transfer to an SSH server. Another remote can use standard LFS to
GitHub. Example Git config:
```
remote.github.url=...
remote.origin.url=ssh://gitssh.example.com/git/some/repo
lfs.customtransfer.rsync.path=git-lfs-rsync-agent
lfs.https://gitssh.example.com/git/.standalonetransferagent=rsync
```
The config assumes that `git-lfs-rsync-agent` determines the remote from
the stage 1 init message and then inspecting `remote.origin.url` to
infer the rsync host. <https://github.com/aleb/git-lfs-rsync-agent>,
2017-09-17, does not yet do that.
[PR-2429] 09b7c5381bc3fa4ba7ca3564681a5ae5b7e6f3dc 'Allow using custom transfer agents directly', <https://github.com/git-lfs/git-lfs/pull/2429>.
CC: Alexandru Băluț <ab@daedalean.ai>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
git-lfs now passes the Git remote in the stage 1 initiation message.
A standalone custom transfer agent can use it to determine the remote
file location.
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Some custom transfer agents figure out everything by themselves and don't need
any authentication or transfer details from the API server.
Added the `lfs.standalonetransferagent` config option for specifying which
custom agent should be used directly.