diff options
author | merakor <cem@ckyln.com> | 2020-09-25 09:30:03 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-09-25 09:30:03 +0000 |
commit | 0bb2aaae1318ff8fadd3585ad29b91905825b6ab (patch) | |
tree | b6569074043b69980a1bcbeb519a312e50f34139 | |
parent | aaae753da096104996d8fb16c2c09df96cc4a24c (diff) | |
download | cpt-0bb2aaae1318ff8fadd3585ad29b91905825b6ab.tar.gz |
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
-rw-r--r-- | src/cpt-lib | 2 |
1 files changed, 1 insertions, 1 deletions
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" ;; |