aboutsummaryrefslogtreecommitdiff
path: root/src/cpt-lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpt-lib')
-rw-r--r--src/cpt-lib6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cpt-lib b/src/cpt-lib
index ebd55a0..6686a81 100644
--- a/src/cpt-lib
+++ b/src/cpt-lib
@@ -561,7 +561,11 @@ pkg_extract() {
log "$1" "Cloning ${url%[@#]*}"; {
git init
git remote add origin "${url%[@#]*}"
- git fetch "${com:+-t}" --depth=1 origin "$com" || git fetch
+ case "$url" in
+ # Tags are specified via '@'
+ *@*) git fetch -t --depth=1 origin "$com" || git fetch ;;
+ *) git fetch --depth=1 origin "$com" || git fetch
+ esac
git checkout "${com:-FETCH_HEAD}"
} || die "$1" "Failed to clone $src"
;;