Commit Graph

22 Commits

Author SHA1 Message Date
Peter Meerwald-Stadler
95672d1c3d Fix typo 'initiation' 2019-08-22 00:24:14 +02:00
Peter Meerwald-Stadler
6088b41d99 Fix typo 'the the' 2019-08-22 00:24:14 +02:00
brian m. carlson
7646075431 tq: pass custom transfer adapter args to the shell
When a custom transfer adapter is specified in the configuration, it is
not possible to specify multiple arguments to the process, because only
the last value of the lfs.customtransfer.*.args option is read and the
value is not split.  To make things easier and more flexible,
concatenate the path (after quoting) and the arguments and pass them to
the shell.  Update the documentation to reflect this change.

Update the test custom transfer adapter to parse its arguments (which
are otherwise ignored) and mention them to standard error.  Make the
test check that the arguments are parsed as the shell would expect them
to be.
2018-09-14 23:52:38 +00:00
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
Steffen Prohaska
9f297dabf4
Pass Git remote in stage 1 initiation message to custom transfer agents
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>
2017-09-20 15:04:25 +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
Steffen Prohaska
9686d3333a
docs/custom-transfers: Fix typo
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
2017-04-23 10:39:43 +02:00
Steffen Prohaska
c91e8b1580
docs/custom-transfers: Format JSON consistently
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
2017-04-23 10:39:43 +02:00
Steffen Prohaska
aef5375990
docs/custom-transfers: Add empty lines for good Markdown style
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
2017-04-23 10:39:43 +02:00
Steffen Prohaska
faee8e6381
docs/custom-transfers: Remove trailing empty lines
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
2017-04-23 10:39:42 +02:00
Steffen Prohaska
fdc3255d45
docs/custom-transfers: Consistently use backticks for JSON and config values
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
2017-04-23 10:39:42 +02:00
Steffen Prohaska
00d6e830b6
docs/custom-transfers: Remove trailing whitespace
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
2017-04-23 10:39:41 +02:00
Steffen Prohaska
8bda48d12e
docs/custom-transfers: Fix Markdown syntax
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
2017-04-23 10:39:38 +02:00
Steve Streeting
0da5514962 Clarify that requests are sent serially to the custom adapter 2017-01-10 10:59:29 +00:00
Steve Streeting
a90c039962 Make docs for error handling consistent 2016-07-15 15:37:16 +01:00
Steve Streeting
c018b62a7b Rename "id" property to "event" in custom transfer messages 2016-07-15 11:49:07 +01:00
Steve Streeting
94fb71df8f Introduce a message id to each message to disambiguate more easily 2016-07-13 14:28:52 +01:00
Steve Streeting
e8a4586aa3 Check SHA and move file after download
Also update docs to indicate custom adapter does not need to check SHAs.
2016-07-13 14:28:52 +01:00
Steve Streeting
33fa57d6f6 Need to include actions from API in custom transfer protocol 2016-07-13 14:28:52 +01:00
Steve Streeting
3c4d4d3486 Make oids match to avoid confusion in docs 2016-07-13 14:28:52 +01:00
Steve Streeting
7250e7ed18 Remove 'order of preference' from API transfer list
Server should just pick the 'best' one it recognises, simplifies things
and in practice this will be most appropriate anyway
2016-07-13 14:28:52 +01:00
Steve Streeting
2d5e9b5235 Refined first pass design for custom transfers and convert to markdown 2016-07-13 14:27:13 +01:00