update.sh: improve verbose output and readability. (#486)
Would have made it easier to debug https://github.com/Homebrew/homebrew-core/issues/2804 where wasn't clear which directory was causing the issue.
This commit is contained in:
parent
0d189fae57
commit
ed1d1e51da
@ -107,9 +107,8 @@ pop_stash() {
|
|||||||
[[ -z "$STASHED" ]] && return
|
[[ -z "$STASHED" ]] && return
|
||||||
if [[ -n "$HOMEBREW_VERBOSE" ]]
|
if [[ -n "$HOMEBREW_VERBOSE" ]]
|
||||||
then
|
then
|
||||||
|
echo "Restoring your stashed changes to $DIR..."
|
||||||
git stash pop
|
git stash pop
|
||||||
echo "Restoring your stashed changes to $DIR:"
|
|
||||||
git status --short --untracked-files
|
|
||||||
else
|
else
|
||||||
git stash pop "${QUIET_ARGS[@]}" 1>/dev/null
|
git stash pop "${QUIET_ARGS[@]}" 1>/dev/null
|
||||||
fi
|
fi
|
||||||
@ -147,6 +146,11 @@ reset_on_interrupt() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pull() {
|
pull() {
|
||||||
|
if [[ -n "$HOMEBREW_VERBOSE" ]]
|
||||||
|
then
|
||||||
|
echo "Updating $DIR..."
|
||||||
|
fi
|
||||||
|
|
||||||
local DIR
|
local DIR
|
||||||
local TAP_VAR
|
local TAP_VAR
|
||||||
|
|
||||||
@ -187,8 +191,7 @@ pull() {
|
|||||||
then
|
then
|
||||||
if [[ -n "$HOMEBREW_VERBOSE" ]]
|
if [[ -n "$HOMEBREW_VERBOSE" ]]
|
||||||
then
|
then
|
||||||
echo "Stashing uncommitted changes to $DIR."
|
echo "Stashing uncommitted changes to $DIR..."
|
||||||
git status --short --untracked-files=all
|
|
||||||
fi
|
fi
|
||||||
git merge --abort &>/dev/null
|
git merge --abort &>/dev/null
|
||||||
git rebase --abort &>/dev/null
|
git rebase --abort &>/dev/null
|
||||||
@ -417,6 +420,7 @@ EOS
|
|||||||
do
|
do
|
||||||
[[ -d "$DIR/.git" ]] || continue
|
[[ -d "$DIR/.git" ]] || continue
|
||||||
pull "$DIR"
|
pull "$DIR"
|
||||||
|
[[ -n "$HOMEBREW_VERBOSE" ]] && echo
|
||||||
done
|
done
|
||||||
|
|
||||||
safe_cd "$HOMEBREW_REPOSITORY"
|
safe_cd "$HOMEBREW_REPOSITORY"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user