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
REV="${UPSTREAM_REV}+$((REV - UPSTREAM_REV))"
fi
- REV="${REV:+r$REV}"
+ REV="${REV:+r$REV-$(git log -n 1 --format="%h" $UPSTREAM_BASE)}"
+
;;
esac