case "$GET_REV" in
r*)
GET_REV="$(echo $GET_REV | tr -d 'r')"
- BASE_REV="$(git rev-list ${REBOOT}..HEAD | wc -l | awk '{print $1}')"
+ BASE_REV="$(git rev-list ${REBOOT}..HEAD 2>/dev/null | wc -l | awk '{print $1}')"
REV="$(git rev-parse HEAD~$((BASE_REV - GET_REV)))"
;;
*)
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
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}')"
+ REV="$(git rev-list ${REBOOT}..$GET_REV 2>/dev/null | wc -l | awk '{print $1}')"
if [ -n "$ORIGIN" ]; then
UPSTREAM_BASE="$(git merge-base $GET_REV $ORIGIN)"
- UPSTREAM_REV="$(git rev-list ${REBOOT}..$UPSTREAM_BASE | wc -l | awk '{print $1}')"
+ UPSTREAM_REV="$(git rev-list ${REBOOT}..$UPSTREAM_BASE 2>/dev/null | wc -l | awk '{print $1}')"
else
UPSTREAM_REV=0
fi