diff --git a/scripts/getver.sh b/scripts/getver.sh
index e718485852d427300892f412dba320a494a1c23f..d5f29864b57b24b2dab693ad88c58da4b4dcc623 100755
--- a/scripts/getver.sh
+++ b/scripts/getver.sh
@@ -33,7 +33,7 @@ try_git() {
 			UPSTREAM_BASE="$(git merge-base $GET_REV $ORIGIN)"
 			UPSTREAM_REV="$(git rev-list ${REBOOT}..$UPSTREAM_BASE | wc -l | awk '{print $1}')"
 		else
-			UPSTREAM_REV=$REV
+			UPSTREAM_REV=0
 		fi
 
 		if [ "$REV" -gt "$UPSTREAM_REV" ]; then