git-lfs/git
brian m. carlson 0a731aa225
config: don't look for English text in error message
When we run Git to find the .git directory, we look for the text "not a
git repository" to check if we got something that isn't a Git
repository, and if so, we suppress the message.

However, this is error prone.  We've already seen changes in this text
from different versions of Git, and obviously if the user is invoking
Git LFS with a different locale (say, Spanish or French), the error
message will not contain this text, leading to an ugly error message
when running git lfs env.

Let's instead check for the expected exit status and assume that we're
not in a Git repository if that's the case.  We change the error we
produce to wrap the exec.ExitStatus error using the Go 1.13 %w parameter
so that it can be read using the Go 1.13 error chain functions.
2021-11-02 13:26:28 +00:00
..
gitattr Set package version to v3 2021-09-02 20:41:08 +00:00
githistory Adapt unit tests to the new migrate() BlobFn behavior 2021-10-07 11:44:07 +02:00
attribs.go Set package version to v3 2021-09-02 20:41:08 +00:00
config_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
config.go git: keep reading config if not in a Git repository 2021-11-02 13:26:27 +00:00
filter_process_scanner_test.go git: use pktline repository 2021-07-20 18:37:31 +00:00
filter_process_scanner.go Set package version to v3 2021-09-02 20:41:08 +00:00
filter_process_status.go git: introduce type 'FilterProcessStatus' 2017-08-24 18:28:50 -04:00
git_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
git.go config: don't look for English text in error message 2021-11-02 13:26:28 +00:00
ls_files.go Set package version to v3 2021-09-02 20:41:08 +00:00
ls_tree_scanner_test.go commands/fsck: exit 1 on failed fsck 2021-07-14 18:15:31 +00:00
ls_tree_scanner.go fsck: don't detect symlinks as invalid pointers 2021-10-20 20:51:41 +00:00
object_scanner.go Support SHA-256 repositories 2020-07-29 20:53:44 +00:00
refs_test.go git: port over existing commands.refUpdate tests 2018-01-05 15:18:17 -07:00
refs.go git: remove unnecessary debug trace messages 2018-01-17 11:06:23 -07:00
rev_list_scanner_test.go git: avoid "bad object" messages when force-pushing 2020-04-23 15:13:31 +00:00
rev_list_scanner.go Set package version to v3 2021-09-02 20:41:08 +00:00
version.go Set package version to v3 2021-09-02 20:41:08 +00:00