diff --git a/scripts/getver.sh b/scripts/getver.sh index 0659d8004a0..e9a5cca0740 100755 --- a/scripts/getver.sh +++ b/scripts/getver.sh @@ -23,6 +23,9 @@ try_git() { BASE_REV="$(git rev-list ${REBOOT}..HEAD 2>/dev/null | wc -l | awk '{print $1}')" [ $((BASE_REV - GET_REV)) -ge 0 ] && REV="$(git rev-parse HEAD~$((BASE_REV - GET_REV)))" ;; + *-*-*) # ISO date format - for approximating when packages were removed or renamed + GET_REV="$(git log -n 1 --format="%h" --until "$GET_REV")" + ;& # FALLTHROUGH *) BRANCH="$(git rev-parse --abbrev-ref HEAD)" ORIGIN="$(git rev-parse --verify --symbolic-full-name ${BRANCH}@{u} 2>/dev/null)"