diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh index 2bed2250ae7..e6a4328e3c4 100755 --- a/common/travis/changed_templates.sh +++ b/common/travis/changed_templates.sh @@ -10,9 +10,10 @@ case "$tip" in *) tip="${tip%% *}" ;; esac -base="$(git merge-base FETCH_HEAD "$tip")" || { - echo "Your branches is based on too old copy." - echo "Please rebase to newest copy." +base="$(git merge-base FETCH_HEAD "$tip")" + +[ $(git rev-list --count "$tip" "^$base") -lt 200 ] || { + echo "::error title=Branch out of date::Your branch is too out of date. Please rebase on upstream and force-push." exit 1 }