Commit Graph

13 Commits

Author SHA1 Message Date
Steffen Prohaska
49cb579583
Support standalonetransferagent based on API URL prefix match
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>
2017-09-20 15:04:25 +02:00
Alexandru Băluț
4949d92140 commands: Disable lock verification when using a standalone custom-transfer agent 2017-08-10 18:00:16 +02:00
Alexandru Băluț
09b7c5381b Allow using custom transfer agents directly
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.
2017-07-31 16:28:07 +02:00
Taylor Blau
624d85684d commands/track: quote pattern in output of track command 2017-03-24 11:13:11 -06:00
risk danger olson
4a5103c5fa include GIT_TRANSFER_TRACE on tests that test transfer adapter behavior
GIT_TRACE is still needed here to override the default GIT_TRACE=5 value for tests
2017-03-23 11:48:58 -06:00
Taylor Blau
43f11094a3 test/custom-transfers: test object verification 2017-03-17 13:13:20 -06:00
Steve Streeting
44cc32dee8 Add failing test 2017-01-10 10:19:57 +00:00
risk danger olson
c9a03bb3bc commands: remove last httputil usage 2017-01-04 16:10:53 -07:00
risk danger olson
303156e0e2 Change Adapter Begin() signature to accept an AdapterConfig interface 2016-12-15 09:59:06 -07:00
Steve Streeting
68749e9638 Test files are moved into lfs objects correctly 2016-07-13 15:24:21 +01:00
Steve Streeting
5fbc31c916 Test for custom transfer uploading and downloading 2016-07-13 14:28:52 +01:00
Steve Streeting
aceca9ef5b Test to prove push fails correctly when custom path is wrong 2016-07-13 14:28:52 +01:00
Steve Streeting
f380954ce1 Basic test just to bootstrap & confirm custom adapter running 2016-07-13 14:28:52 +01:00