git-lfs/lfshttp
Chris Darroch b6b0b6fef0 lfshttp: handle bare repos in standalone adapter
The Go test suite adds remotes in the form of temporary bare Git
repositories, which lack a ".git" directory.  These are then configured
with their local paths as the value of the "remote.origin.url" key,
which the EndpointFinder returns, but with "/.git" appended by the
EndpointFromLocalPath() function.

When the standalone transfer adapter attempts to chdir(2) to one of
these file paths in order to run the "git rev-parse --git-dir" command
when setting up a new handler, it obviously fails.

We can address this by simply removing any trailing "/.git" path
segment in the gitDirAtPath() function in the standalone adapter.
The "git rev-parse --git-dir" command will succeed in either case,
whether in a bare repository or a regular one.

This should permit any users who have Git LFS configurations with
custom adapters that depend on the EndpointFinder's current logic
to continue to work, while allowing our Go test suite to succeed
with its bare remote repositories.
2020-03-27 20:37:38 -07:00
..
standalone lfshttp: handle bare repos in standalone adapter 2020-03-27 20:37:38 -07: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 lfshttp: cache clients based on host and access type 2019-12-09 15:35:52 +00: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: allow renegotiation 2020-03-10 19:21:03 +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 lfshttp: improve proxy support 2020-01-07 15:45:31 +00:00
proxy.go lfshttp: improve proxy support 2020-01-07 15:45:31 +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