aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/cmd/update.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index c0658aa4c..9a9567101 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -242,6 +242,15 @@ EOS
INITIAL_BRANCH="$(git symbolic-ref --short HEAD 2>/dev/null)"
if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" ]]
then
+
+ if [[ -z "$HOMEBREW_DEVELOPER" ]]
+ then
+ opoo <<EOS
+Checking out $UPSTREAM_BRANCH.
+Set HOMEBREW_DEVELOPER=1 to preserve branch when updating Homebrew.
+EOS
+ fi
+
# Recreate and check out `#{upstream_branch}` if unable to fast-forward
# it to `origin/#{@upstream_branch}`. Otherwise, just check it out.
if git merge-base --is-ancestor "$UPSTREAM_BRANCH" "origin/$UPSTREAM_BRANCH" &>/dev/null