1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-15 11:53:59 +02:00

build,travis: git rev-list can also error and return nothing

"fatal: Invalid revision range XXX...YYY"

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
This commit is contained in:
Etienne Champetier 2017-08-13 15:37:18 -07:00
parent bd4fd07f1b
commit dede62cf88

View File

@ -165,8 +165,10 @@ echo_blue "=== Travis ENV"
env env
echo_blue "=== Travis ENV" echo_blue "=== Travis ENV"
until [ "$(git rev-list ${TRAVIS_COMMIT_RANGE/.../..} | tail -n1)" != "a22de9b74cf9579d1ce7e6cf1845b4afa4277b00" ]; do while true; do
# if clone depth is too small, git rev-list / diff return incorrect results # if clone depth is too small, git rev-list / diff return incorrect or empty results
C="$(git rev-list ${TRAVIS_COMMIT_RANGE/.../..} | tail -n1)" 2>/dev/null
[ -n "$C" -a "$C" != "a22de9b74cf9579d1ce7e6cf1845b4afa4277b00" ] && break
echo_blue "Fetching 50 commits more" echo_blue "Fetching 50 commits more"
git fetch origin --deepen=50 git fetch origin --deepen=50
done done