From 0bb2aaae1318ff8fadd3585ad29b91905825b6ab Mon Sep 17 00:00:00 2001 From: merakor Date: Fri, 25 Sep 2020 09:30:03 +0000 Subject: pkg_extract(): change git clone behaviour to fetch tags. This makes operations with commits hashes longer, but it can also checkout specific tags, which is a plus. FossilOrigin-Name: 9826a0c4defac46b1719594751bed634a12c905588936e73fec162885266d232 --- src/cpt-lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpt-lib b/src/cpt-lib index 61a7842..fd4b13e 100644 --- a/src/cpt-lib +++ b/src/cpt-lib @@ -561,7 +561,7 @@ pkg_extract() { log "$1" "Cloning ${url%[@#]*}"; { git init git remote add origin "${url%[@#]*}" - git fetch --depth=1 origin "$com" || git fetch + git fetch "${com:+-t}" --depth=1 origin "$com" || git fetch git checkout "${com:-FETCH_HEAD}" } || die "$1" "Failed to clone $src" ;; -- cgit v1.2.3