Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make some git invocations quiet #883

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -927,16 +927,23 @@ ohai "Downloading and installing Homebrew..."
# make sure symlinks are saved as-is
execute "${USABLE_GIT}" "config" "--bool" "core.symlinks" "true"

execute "${USABLE_GIT}" "fetch" "--force" "origin"
execute "${USABLE_GIT}" "fetch" "--force" "--tags" "origin"
if [[ -z "${NONINTERACTIVE-}" ]]
then
quiet_progress=("--quiet" "--progress")
else
quiet_progress=("--quiet")
fi
execute "${USABLE_GIT}" "fetch" "${quiet_progress[@]}" "--force" "origin"
execute "${USABLE_GIT}" "fetch" "${quiet_progress[@]}" "--force" "--tags" "origin"

execute "${USABLE_GIT}" "remote" "set-head" "origin" "--auto" >/dev/null

LATEST_GIT_TAG="$("${USABLE_GIT}" tag --list --sort="-version:refname" | head -n1)"
if [[ -z "${LATEST_GIT_TAG}" ]]
then
abort "Failed to query latest Homebrew/brew Git tag."
fi
execute "${USABLE_GIT}" "checkout" "--force" "-B" "stable" "${LATEST_GIT_TAG}"
execute "${USABLE_GIT}" "checkout" "--quiet" "--force" "-B" "stable" "${LATEST_GIT_TAG}"

if [[ "${HOMEBREW_REPOSITORY}" != "${HOMEBREW_PREFIX}" ]]
then
Expand All @@ -962,7 +969,8 @@ ohai "Downloading and installing Homebrew..."
execute "${USABLE_GIT}" "config" "remote.origin.fetch" "+refs/heads/*:refs/remotes/origin/*"
execute "${USABLE_GIT}" "config" "--bool" "core.autocrlf" "false"
execute "${USABLE_GIT}" "config" "--bool" "core.symlinks" "true"
execute "${USABLE_GIT}" "fetch" "--force" "origin" "refs/heads/master:refs/remotes/origin/master"
execute "${USABLE_GIT}" "fetch" "--force" "${quiet_progress[@]}" \
"origin" "refs/heads/master:refs/remotes/origin/master"
execute "${USABLE_GIT}" "remote" "set-head" "origin" "--auto" >/dev/null
execute "${USABLE_GIT}" "reset" "--hard" "origin/master"

Expand Down