common/travis/changed_templates.sh: change branch age check for treeless
small logic change because we now have the complete commit history instead of just `--depth=200`. This preserves the 200 commit limit with a slightly- enhanced error message (wording clarified and it now shows up as an error annotation)
This commit is contained in:
parent
7249e827a1
commit
c1dc168f80
1 changed files with 4 additions and 3 deletions
|
@ -10,9 +10,10 @@ case "$tip" in
|
||||||
*) tip="${tip%% *}" ;;
|
*) tip="${tip%% *}" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
base="$(git merge-base FETCH_HEAD "$tip")" || {
|
base="$(git merge-base FETCH_HEAD "$tip")"
|
||||||
echo "Your branches is based on too old copy."
|
|
||||||
echo "Please rebase to newest copy."
|
[ $(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
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue