aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-09-24 17:19:44 +0100
committerGitHub2016-09-24 17:19:44 +0100
commitc0d06e015c9a411c0b61231375792b3d6e1af34f (patch)
tree2ff22623514c16d9520188691a1d43f44f0ad87e /Library
parent0ba19c852bb4b999eff9d8475ee762da902b20d8 (diff)
parent07866f0b54e0d8cd26f761922f242aa0ec73c40c (diff)
downloadbrew-c0d06e015c9a411c0b61231375792b3d6e1af34f.tar.bz2
Merge pull request #1114 from zmwangx/update-no-restore-stable-branch
update.sh: do not restore stable (tag) branch
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/update.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index 177958266..ba230bdec 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -297,7 +297,8 @@ EOS
if [[ -n "$HOMEBREW_NO_UPDATE_CLEANUP" ]]
then
- if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" ]]
+ if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" &&
+ ! "$INITIAL_BRANCH" =~ ^v[0-9]+\.[0-9]+\.[0-9]$ ]]
then
git checkout "$INITIAL_BRANCH" "${QUIET_ARGS[@]}"
fi