summaryrefslogtreecommitdiffstats
path: root/abuild.in
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2016-02-11 14:26:08 +0100
committerSören Tempel <soeren+git@soeren-tempel.net>2016-02-11 14:26:08 +0100
commit578ab740adb03486801856886b261aa48a1d9c30 (patch)
tree922c37ae3de02483f44b56d0dca5c606b0fd54b5 /abuild.in
parent8d272af1742564fcdfe5253139b4f2074eb873f0 (diff)
downloadabuild-578ab740adb03486801856886b261aa48a1d9c30.tar.bz2
abuild-578ab740adb03486801856886b261aa48a1d9c30.tar.xz
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.
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 \