1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-25 16:40:07 -07:00

kiss: do a less shallow clone to enable 'git describe'

This downloads all reachable commits and then blobs and trees on demand. It
swaps the clone from shallow to treeless. In other words, it's a less
shallow shallow clone which makes 'git describe' work.
This commit is contained in:
Dylan Araps 2021-06-28 21:52:00 +00:00
parent 17815b698c
commit f5038e1579

2
kiss
View File

@ -273,7 +273,7 @@ pkg_extract() {
log "$1" "Cloning ${url%[#@]*}"; { log "$1" "Cloning ${url%[#@]*}"; {
git init git init
git remote add origin "${url%[#@]*}" git remote add origin "${url%[#@]*}"
git fetch -t --depth 1 origin "$com" || git fetch -t git fetch -t --filter=tree:0 origin "$com" || git fetch -t
git -c advice.detachedHead=0 checkout "${com:-FETCH_HEAD}" git -c advice.detachedHead=0 checkout "${com:-FETCH_HEAD}"
} || die "$1" "Failed to clone $src" } || die "$1" "Failed to clone $src"
;; ;;