X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=scripts%2Fgetver.sh;fp=scripts%2Fgetver.sh;h=e718485852d427300892f412dba320a494a1c23f;hp=a65a6af22847f45e3188baeb527590b8a7cb58be;hb=efdd3bf5fbab94b3f84e8a285e83ef36e39b3e8b;hpb=b051ac76e83f2245f06fda852b0779f328d2954b diff --git a/scripts/getver.sh b/scripts/getver.sh index a65a6af228..e718485852 100755 --- a/scripts/getver.sh +++ b/scripts/getver.sh @@ -25,8 +25,8 @@ try_git() { ;; *) BRANCH="$(git rev-parse --abbrev-ref HEAD)" - ORIGIN="$(git rev-parse --symbolic-full-name ${BRANCH}@{u} 2>/dev/null)" - [ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --symbolic-full-name master@{u} 2>/dev/null)" + ORIGIN="$(git rev-parse --verify --symbolic-full-name ${BRANCH}@{u} 2>/dev/null)" + [ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name master@{u} 2>/dev/null)" REV="$(git rev-list ${REBOOT}..$GET_REV | wc -l | awk '{print $1}')" if [ -n "$ORIGIN" ]; then