aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-09-20 17:15:43 +0100
committerMike McQuaid2016-09-20 17:16:47 +0100
commit96232722839e54ce4cdaf3dc87f976542795eced (patch)
treef29589b9d290571a15150334d112423a1943910e /Library
parentd62512095ff4d82c7337682de77cffe9fe5da2f2 (diff)
downloadbrew-96232722839e54ce4cdaf3dc87f976542795eced.tar.bz2
update.sh: force a full update if we have no tags.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/update.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index 716c01599..acf4520ba 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -425,6 +425,12 @@ EOS
declare UPSTREAM_BRANCH"$TAP_VAR"="$UPSTREAM_BRANCH_DIR"
declare PREFETCH_REVISION"$TAP_VAR"="$(git rev-parse -q --verify refs/remotes/origin/"$UPSTREAM_BRANCH_DIR")"
+ # Force a full update if we don't have any tags.
+ if [[ "$DIR" = "$HOMEBREW_REPOSITORY" && -z "$(git tag --list)" ]]
+ then
+ HOMEBREW_UPDATE_FORCE=1
+ fi
+
if [[ -z "$HOMEBREW_UPDATE_FORCE" ]]
then
[[ -n "$SKIP_FETCH_BREW_REPOSITORY" && "$DIR" = "$HOMEBREW_REPOSITORY" ]] && continue