From f5038e1579f62ae8a148bddbf8675fabc330bf16 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 28 Jun 2021 21:52:00 +0000 Subject: [PATCH] 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. --- kiss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kiss b/kiss index f52d6ba..cd76bd7 100755 --- a/kiss +++ b/kiss @@ -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" ;;