contrib/copr: better detect git-ref in "nm-copr-build.sh"

This commit is contained in:
Thomas Haller 2023-01-24 14:58:47 +01:00
parent 36ad5cbb3b
commit fce8e572d0
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -66,6 +66,7 @@ git remote remove nm-git-bundle || true
GIT_SHA="$(git show-ref --verify --hash "$GIT_REF" 2>/dev/null ||
git show-ref --verify --hash "refs/remotes/origin/$GIT_REF" 2>/dev/null ||
git rev-parse --verify "refs/remotes/origin/$GIT_REF" 2>/dev/null ||
git rev-parse --verify "$GIT_REF^{commit}" 2>/dev/null)"
git checkout -b tmp "$GIT_SHA"