From bb6a8d1d52dcaf5d25c4936623ed5cab8d6a24de Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 27 Jan 2022 19:27:51 +0100 Subject: [PATCH] git-undescr.sh: Support full output of git-descr.sh. contrib/ChangeLog: * git-undescr.sh: Support full output of git-descr.sh. --- contrib/git-undescr.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/git-undescr.sh b/contrib/git-undescr.sh index 7d2efe1a8e7..9d882a6814e 100755 --- a/contrib/git-undescr.sh +++ b/contrib/git-undescr.sh @@ -3,8 +3,8 @@ # Script to undescribe a GCC revision o=$(git config --get gcc-config.upstream); -r=$(echo $1 | sed -n 's,^r\([0-9]\+\)-[0-9]\+$,\1,p'); -n=$(echo $1 | sed -n 's,^r[0-9]\+-\([0-9]\+\)$,\1,p'); +r=$(echo $1 | sed -n 's,^r\([0-9]\+\)-[0-9]\+\(-g[0-9a-f]\+\)\?$,\1,p'); +n=$(echo $1 | sed -n 's,^r[0-9]\+-\([0-9]\+\)\(-g[0-9a-f]\+\)\?$,\1,p'); test -z $r && echo Invalid id $1 && exit 1; h=$(git rev-parse --verify --quiet ${o:-origin}/releases/gcc-$r);