diff options
| author | Mike McQuaid | 2018-01-11 20:40:47 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2018-01-11 20:40:59 +0000 |
| commit | 228cbd81c9e5d88124d09b73e44bc7bceb40972d (patch) | |
| tree | 0b3c79874d85c7d6a42930479c0aa9ab193dc855 /Library/Homebrew/utils | |
| parent | 02591bdf341b4c33383b5eb537bcff0e49157a82 (diff) | |
| download | brew-228cbd81c9e5d88124d09b73e44bc7bceb40972d.tar.bz2 | |
Use Homebrew's gitconfig for various commands
Git is a transport and storage mechanism for us so we don't want to
allow arbitrary customisation of this due to user issues e.g. #3664
and #3561.
Fixes #3664.
Diffstat (limited to 'Library/Homebrew/utils')
| -rw-r--r-- | Library/Homebrew/utils/git.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/utils/git.rb b/Library/Homebrew/utils/git.rb index f1113af66..c50979b1e 100644 --- a/Library/Homebrew/utils/git.rb +++ b/Library/Homebrew/utils/git.rb @@ -60,6 +60,12 @@ module Utils raise "Git is unavailable" unless git_available? end + def self.with_homebrew_gitconfig + with_env(HOME: HOMEBREW_LIBRARY/"Homebrew/gitconfig") do + yield if block_given? + end + end + def self.clear_git_available_cache @git = nil @git_path = nil |
