summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index e9e2b70..cc3d0c0 100644
--- a/abuild.in
+++ b/abuild.in
@@ -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 \