From 59958777c16915d11663a54485ffb8c18898ecc2 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 12 Feb 2020 20:00:14 +0000 Subject: [PATCH] update: allow setting Git name and email. This is needed for `brew test-bot` when no global Git configuration is present. --- Library/Homebrew/cmd/update.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 810fbb5617..f22ef9bb47 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -383,6 +383,18 @@ EOS export GIT_TERMINAL_PROMPT="0" export GIT_SSH_COMMAND="ssh -oBatchMode=yes" + if [[ -n "$HOMEBREW_GIT_NAME" ]] + then + export GIT_AUTHOR_NAME="$HOMEBREW_GIT_NAME" + export GIT_COMMITTER_NAME="$HOMEBREW_GIT_NAME" + fi + + if [[ -n "$HOMEBREW_GIT_EMAIL" ]] + then + export GIT_AUTHOR_EMAIL="$HOMEBREW_GIT_EMAIL" + export GIT_COMMITTER_EMAIL="$HOMEBREW_GIT_EMAIL" + fi + if [[ -z "$HOMEBREW_VERBOSE" ]] then QUIET_ARGS=(-q)