Correctly return "unknown" instead of printing various error messages, followed by a "r0-..." revision.
Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> --- scripts/getver.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/getver.sh b/scripts/getver.sh index 9175f411db..1032fa324e 100755 --- a/scripts/getver.sh +++ b/scripts/getver.sh @@ -24,6 +24,8 @@ try_git() { REV="$(git rev-parse HEAD~$((BASE_REV - GET_REV)))" ;; *) + git rev-parse "$GET_REV^{commit}" >/dev/null 2>&1 || return 1 + 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)" -- 2.13.2 _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev