git-lfs/lfshttp
brian m. carlson f8de4cc7fe
Add support for local paths
Currently, we only support local remotes using file URLs, but not local
paths.  This is a highly requested feature, however, so implement
support for local paths as remotes.

First, fix the handling of local paths we already have: the handling of
absolute Unix-style paths.  Instead of checking for the remote to
contain a file URL to determine whether to append "info/lfs" to the URL,
look to see if the URL we're using is a file URL, which will catch local
paths which will have been rewritten as such by this point.  The
"info/lfs" part of the URL is not handled by the transfer adapter, so we
don't want to add it on.

If we get something that looks like it's not a URL, check if it's a
file on the file system, and if so, don't attempt to interpret it as an
SSH URL.  This fixes the confusion with Windows paths, which resemble
SSH-style locations with a single-letter alias as the host name.

Finally, when turning a local path into a file URL, turn the path into
an absolute one if possible and rewrite it using slashes, which is
required for file URLs.  Add several tests for the various cases: one
for Unix-style paths, one for native paths, and one for relative paths.
2019-11-14 17:23:12 +00:00
..
standalone Provide support for file URLs via a transfer agent 2019-08-02 17:23:47 +00:00
body.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00
certs_darwin.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00
certs_dragonfly.go Support DragonFly BSD 2019-09-26 07:12:23 +08:00
certs_freebsd.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00
certs_linux.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00
certs_openbsd.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00
certs_test.go Merge branch 'master' into nikola-sh/fix_ssl_auth 2019-11-01 20:05:21 +03:00
certs_windows.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00
certs.go fix ssl certificate logic 2019-10-18 21:19:35 +03:00
client_test.go lfshttp: support http.version 2019-10-29 19:47:20 +00:00
client.go lfshttp: support http.version 2019-10-29 19:47:20 +00:00
cookies.go Use different parser for cookiejar files 2019-10-27 16:48:15 -05:00
endpoint.go Add support for local paths 2019-11-14 17:23:12 +00:00
errors.go Add integration tests; check other places where 429 could occur 2019-01-07 12:27:02 +03:00
lfshttp.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00
proxy_test.go Add support for SOCKS proxies 2019-06-06 13:59:27 +00:00
proxy.go Add support for SOCKS proxies 2019-06-06 13:59:27 +00:00
retries_test.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00
retries.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00
ssh_test.go Merge branch 'master' into lfshttp 2018-09-14 11:42:19 -07:00
ssh.go ssh: redirect stdin from /dev/null 2019-07-19 16:00:21 +00:00
stats_test.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00
stats.go Fix Typos 2019-07-24 07:17:40 +00:00
verbose_test.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00
verbose.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00