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
1 changed files with 1 additions and 1 deletions

2
kiss
View File

@ -273,7 +273,7 @@ pkg_extract() {
log "$1" "Cloning ${url%[#@]*}"; {
git init
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}"
} || die "$1" "Failed to clone $src"
;;