index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Eli Schwartz <eschwartz@archlinux.org> | 2017-09-12 23:57:32 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2017-09-13 14:20:35 +1000 |
commit | 39319c1860d200a9b4a3cc2c6975e3cece502f2d (patch) | |
tree | cf683fb6978a2921aab35b6f663d48a7775009a6 /scripts/libmakepkg | |
parent | 64b7edd2fed122e63abd42dbe392a6f2896a0c16 (diff) |
-rw-r--r-- | scripts/libmakepkg/source/git.sh.in | 11 |
diff --git a/scripts/libmakepkg/source/git.sh.in b/scripts/libmakepkg/source/git.sh.in index 6d7e0a67..252cd4da 100644 --- a/scripts/libmakepkg/source/git.sh.in +++ b/scripts/libmakepkg/source/git.sh.in @@ -65,7 +65,7 @@ download_git() { } extract_git() { - local netfile=$1 + local netfile=$1 tagname local fragment=$(get_uri_fragment "$netfile") local repo=$(get_filename "$netfile") @@ -110,6 +110,15 @@ extract_git() { esac fi + if [[ ${fragment%%=*} = tag ]]; then + tagname="$(git tag -l --format='%(tag)' "$ref")" + if [[ -n $tagname && $tagname != $ref ]]; then + error "$(gettext "Failure while checking out version %s, the git tag has been forged")" "$ref" + plain "$(gettext "Aborting...")" + exit 1 + fi + fi + if [[ $ref != "origin/HEAD" ]] || (( updating )) ; then if ! git checkout --force --no-track -B makepkg $ref; then error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "git" |