aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils
diff options
context:
space:
mode:
authorMike McQuaid2018-01-14 18:17:06 +0000
committerGitHub2018-01-14 18:17:06 +0000
commit253a41f52370a2625a0e2684f7afa85405cdc5d2 (patch)
tree2bf09dd96b9a1a231892c13eb96a00c408e282a6 /Library/Homebrew/utils
parentfcec5ad3600dc39518557923d5b6e6402e22b89b (diff)
parent228cbd81c9e5d88124d09b73e44bc7bceb40972d (diff)
downloadbrew-253a41f52370a2625a0e2684f7afa85405cdc5d2.tar.bz2
Merge pull request #3670 from MikeMcQuaid/gitconfig
Use Homebrew's gitconfig for various commands
Diffstat (limited to 'Library/Homebrew/utils')
-rw-r--r--Library/Homebrew/utils/git.rb6
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