Skip to content
Snippets Groups Projects
Commit 4284b82d authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #1380 from woodruffw/silence-git

Redirect stderr output from git (shim) invocations to /dev/null.
parents 84d1661b 72b81844
No related branches found
No related tags found
No related merge requests found
...@@ -217,7 +217,7 @@ esac ...@@ -217,7 +217,7 @@ esac
if [[ -z "$HOMEBREW_DEVELOPER" ]] if [[ -z "$HOMEBREW_DEVELOPER" ]]
then then
export HOMEBREW_GIT_CONFIG_FILE="$HOMEBREW_REPOSITORY/.git/config" export HOMEBREW_GIT_CONFIG_FILE="$HOMEBREW_REPOSITORY/.git/config"
HOMEBREW_GIT_CONFIG_DEVELOPERMODE="$(git config --file="$HOMEBREW_GIT_CONFIG_FILE" --get homebrew.devcmdrun)" HOMEBREW_GIT_CONFIG_DEVELOPERMODE="$(git config --file="$HOMEBREW_GIT_CONFIG_FILE" --get homebrew.devcmdrun 2>/dev/null)"
if [[ "$HOMEBREW_GIT_CONFIG_DEVELOPERMODE" = "true" ]] if [[ "$HOMEBREW_GIT_CONFIG_DEVELOPERMODE" = "true" ]]
then then
export HOMEBREW_DEV_CMD_RUN="1" export HOMEBREW_DEV_CMD_RUN="1"
...@@ -231,7 +231,7 @@ elif [[ -f "$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh" ]] ...@@ -231,7 +231,7 @@ elif [[ -f "$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh" ]]
then then
if [[ -z "$HOMEBREW_DEVELOPER" ]] if [[ -z "$HOMEBREW_DEVELOPER" ]]
then then
git config --file="$HOMEBREW_GIT_CONFIG_FILE" --replace-all homebrew.devcmdrun true git config --file="$HOMEBREW_GIT_CONFIG_FILE" --replace-all homebrew.devcmdrun true 2>/dev/null
export HOMEBREW_DEV_CMD_RUN="1" export HOMEBREW_DEV_CMD_RUN="1"
fi fi
HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh" HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh"
......
...@@ -7,7 +7,7 @@ migrate-legacy-uuid-file() { ...@@ -7,7 +7,7 @@ migrate-legacy-uuid-file() {
local analytics_uuid="$(<"$legacy_uuid_file")" local analytics_uuid="$(<"$legacy_uuid_file")"
if [[ -n "$analytics_uuid" ]] if [[ -n "$analytics_uuid" ]]
then then
git config --file="$HOMEBREW_REPOSITORY/.git/config" --replace-all homebrew.analyticsuuid "$analytics_uuid" git config --file="$HOMEBREW_REPOSITORY/.git/config" --replace-all homebrew.analyticsuuid "$analytics_uuid" 2>/dev/null
fi fi
rm -f "$legacy_uuid_file" rm -f "$legacy_uuid_file"
fi fi
...@@ -23,8 +23,8 @@ setup-analytics() { ...@@ -23,8 +23,8 @@ setup-analytics() {
return return
fi fi
local message_seen="$(git config --file="$git_config_file" --get homebrew.analyticsmessage)" local message_seen="$(git config --file="$git_config_file" --get homebrew.analyticsmessage 2>/dev/null)"
local analytics_disabled="$(git config --file="$git_config_file" --get homebrew.analyticsdisabled)" local analytics_disabled="$(git config --file="$git_config_file" --get homebrew.analyticsdisabled 2>/dev/null)"
if [[ "$message_seen" != "true" || "$analytics_disabled" = "true" ]] if [[ "$message_seen" != "true" || "$analytics_disabled" = "true" ]]
then then
# Internal variable for brew's use, to differentiate from user-supplied setting # Internal variable for brew's use, to differentiate from user-supplied setting
...@@ -32,7 +32,7 @@ setup-analytics() { ...@@ -32,7 +32,7 @@ setup-analytics() {
return return
fi fi
HOMEBREW_ANALYTICS_USER_UUID="$(git config --file="$git_config_file" --get homebrew.analyticsuuid)" HOMEBREW_ANALYTICS_USER_UUID="$(git config --file="$git_config_file" --get homebrew.analyticsuuid 2>/dev/null)"
if [[ -z "$HOMEBREW_ANALYTICS_USER_UUID" ]] if [[ -z "$HOMEBREW_ANALYTICS_USER_UUID" ]]
then then
if [[ -n "$HOMEBREW_LINUX" ]] if [[ -n "$HOMEBREW_LINUX" ]]
...@@ -51,7 +51,7 @@ setup-analytics() { ...@@ -51,7 +51,7 @@ setup-analytics() {
export HOMEBREW_NO_ANALYTICS_THIS_RUN="1" export HOMEBREW_NO_ANALYTICS_THIS_RUN="1"
return return
fi fi
git config --file="$git_config_file" --replace-all homebrew.analyticsuuid "$HOMEBREW_ANALYTICS_USER_UUID" git config --file="$git_config_file" --replace-all homebrew.analyticsuuid "$HOMEBREW_ANALYTICS_USER_UUID" 2>/dev/null
fi fi
if [[ -n "$HOMEBREW_LINUX" ]] if [[ -n "$HOMEBREW_LINUX" ]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment