Commit 578ab740 authored by Sören Tempel's avatar Sören Tempel

abuild: Respect $reporev variable when fetching git repositories

For git repositories the $reporev variable is not really used since the
$_rev variable is passed to git and $_rev was only set when $reporev was
empty.
parent 8d272af1
......@@ -2038,7 +2038,8 @@ snapshot() {
local _version=${verbase:-0}_git${_date}
command -v git >/dev/null || \
die "Missing git! Install git to support git clone."
[ -z "$reporev" ] && local _rev="HEAD" && local _depth="--depth=1"
local _rev="${reporev:-HEAD}"
[ "$_rev" = "HEAD" ] && local _depth="--depth=1"
msg "Creating git snapshot: $pkgname-$_version"
git clone $_depth --bare $giturl $pkgname-$_version || return 1
git --git-dir $pkgname-$_version archive \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment