git-undescr.sh: Support full output of git-descr.sh.

contrib/ChangeLog:

	* git-undescr.sh: Support full output of git-descr.sh.
This commit is contained in:
Martin Liska 2022-01-27 19:27:51 +01:00
parent 9cbfbe2497
commit bb6a8d1d52

View File

@ -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);