aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/update.sh
diff options
context:
space:
mode:
authorMike McQuaid2018-01-11 20:40:47 +0000
committerMike McQuaid2018-01-11 20:40:59 +0000
commit228cbd81c9e5d88124d09b73e44bc7bceb40972d (patch)
tree0b3c79874d85c7d6a42930479c0aa9ab193dc855 /Library/Homebrew/cmd/update.sh
parent02591bdf341b4c33383b5eb537bcff0e49157a82 (diff)
downloadbrew-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/cmd/update.sh')
-rw-r--r--Library/Homebrew/cmd/update.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index 747784527..c28a79d02 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -19,7 +19,11 @@ git() {
then
GIT_EXECUTABLE="$("$HOMEBREW_LIBRARY/Homebrew/shims/scm/git" --homebrew=print-path)"
fi
+ OLDHOME="$HOME"
+ export HOME="$HOMEBREW_LIBRARY/Homebrew/gitconfig"
"$GIT_EXECUTABLE" "$@"
+ export HOME="$OLDHOME"
+ unset OLDHOME
}
git_init_if_necessary() {