0a731aa225
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. |
||
---|---|---|
.. | ||
gitattr | ||
githistory | ||
attribs.go | ||
config_test.go | ||
config.go | ||
filter_process_scanner_test.go | ||
filter_process_scanner.go | ||
filter_process_status.go | ||
git_test.go | ||
git.go | ||
ls_files.go | ||
ls_tree_scanner_test.go | ||
ls_tree_scanner.go | ||
object_scanner.go | ||
refs_test.go | ||
refs.go | ||
rev_list_scanner_test.go | ||
rev_list_scanner.go | ||
version.go |