git-lfs/config
brian m. carlson 263b434e97
config: optionally read .lfsconfig from the repository
Currently we only read .lfsconfig from the working tree.  This is better
than nothing, but it means that if there's an LFS file that starts with
a name earlier than .lfsconfig, we won't read the proper config file,
and we won't use any LFS remote URLs that are located in that file.

If the file is missing, let's additionally read from the index, if
there's a working tree, and then from HEAD.  If the repository is bare,
let's just read from HEAD.  This is very similar to what Git does for
.gitmodules.

It does, however, differ in one significant way: Git will read from the
index first if it's doing a checkout, since that might have newer
information.  We don't do that here, since it's not totally clear that
we can articulate all the cases where that occurs in Git LFS, but we
explicitly allow for the possibility of changing the behavior in the
future and document the feature accordingly.

We no longer read the file .lfsconfig from a bare repository, but that
we did this in the first place was very questionable and pretty clearly
a bug, so it's intentional that we no longer do.
2020-08-06 20:04:00 +00:00
..
config_test.go config: tidy existing files with goimports 2019-09-11 14:37:13 +00:00
config.go config: optionally read .lfsconfig from the repository 2020-08-06 20:04:00 +00:00
delayed_environment.go Fix Typos 2019-07-24 07:17:40 +00:00
environment_test.go config/environment_test: use last value in gitconfig 2017-04-14 13:44:43 -04:00
environment.go add some godocs 2017-10-27 14:10:46 -06:00
extension_test.go lfs: use github.com/stretchr/testify for assertions 2016-05-25 10:43:10 -06:00
extension.go Major refactor to pull things into config, httputil, tools 2016-05-13 17:38:06 +01:00
fetcher.go Fix Typos 2019-07-24 07:17:40 +00:00
git_fetcher_test.go Properly handle config options for URLs with upper case letters 2019-04-02 16:06:14 +00:00
git_fetcher.go config: tidy existing files with goimports 2019-09-11 14:37:13 +00:00
map_fetcher.go config,lfsapi: return last element of gitconfig, not first 2017-04-14 13:33:13 -04:00
netrc_nix.go config: rename netrc files 2017-10-18 14:51:24 -06:00
netrc_windows.go config: rename netrc files 2017-10-18 14:51:24 -06:00
netrc.go *: use patched version of bgetnry/go-netrc 2018-05-25 12:42:02 -07:00
os_fetcher.go Fix Typos 2019-07-24 07:17:40 +00:00
url_config_test.go config: add wildcard url matching tests 2018-11-26 17:08:17 -08:00
url_config.go config: match URLs according to git rules 2018-11-26 17:08:17 -08:00
util_nix.go config: add a umask lookup function 2018-10-09 15:11:17 +00:00
util_windows.go config: add a umask lookup function 2018-10-09 15:11:17 +00:00
version.go release: v2.11.0 2020-05-06 20:30:42 +00:00