From 578ab740adb03486801856886b261aa48a1d9c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Thu, 11 Feb 2016 14:26:08 +0100 Subject: 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. --- abuild.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'abuild.in') 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 \ -- cgit v1.2.3