git-lfs/config
Taylor Blau 5e5c798d09 config/config.go: case-insensitive error search
In the internal function loadGitDirs, Git LFS will attempt to resolve
the working and dotgit directory by calling 'git rev-parse --git-dir
--show-top-level'.

This information is used in the output of 'git lfs env', which displays
information about the system- and repository-level configuration as it
pertains to Git LFS.

However, when 'git lfs env' is called outside of the repository, any
information that is repository-specific is left blank. For example,

  $ git lfs env
  git-lfs/2.4.0 (GitHub; darwin amd64; go 1.10.3)
  git version: 2.18.0

  LocalWorkingDir=

We ``silence'' the error coming from 'git-rev-parse(1)' in loadGitDirs
by looking for the string "Not a git repository". If we found that
string, we don't show the error message on STDERR (because it is OK not
to), but if we fail to find that string, we assume that the error is
legitimate and thusly forward it on to STDERR.

This string changed casing in [1], so we make a corresponding change
here in order to catch the casing on all versions of Git (by making the
comparison case-insensitive).

[1]: git/git@fc045fe7d4 (Mark messages for translations, 2018-02-13)
2018-07-02 13:05:45 -05:00
..
config_test.go config: add PushRemote() for checking branch.*.pushRemote and remote.pushDefault first 2017-11-03 10:36:12 -06:00
config.go config/config.go: case-insensitive error search 2018-07-02 13:05:45 -05:00
delayed_environment.go config: change gitEnvironment -> delayedEnvironment, use it in tests 2017-10-18 14:46:21 -06: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 all: expand config.Environment interface to support multiple values per key 2017-04-12 17:29:11 -04:00
git_fetcher.go Add lfs.locksverify to safe keys. 2017-12-20 10:11:51 +01: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 all: expand config.Environment interface to support multiple values per key 2017-04-12 17:29:11 -04:00
url_config_test.go support lfs.<url>.* values where url does not include .git 2017-05-01 15:09:41 -06:00
url_config.go config: introduce static Bool() and Int() helpers 2017-10-27 10:29:14 -06:00
version.go release: v2.4.0 2018-03-01 15:53:52 -08:00