From a4f7765f9414fd4b120b0b2f6b60280a9bec6b4b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 10 Sep 2021 17:07:54 +0300 Subject: [PATCH] kiss: Shallow clone git sources where possible. Also avoid pulling down tags. See #270 --- kiss | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kiss b/kiss index 0cf31cc..7e9ba4a 100755 --- a/kiss +++ b/kiss @@ -454,10 +454,8 @@ pkg_source_git() { git remote set-url origin "${2%[#@]*}" 2>/dev/null || git remote add origin "${2%[#@]*}" - git fetch -t origin "$com" || - git fetch -t - - git -c advice.detachedHead=0 checkout "${com:-FETCH_HEAD}" + git fetch --depth=1 origin "$com" + git reset --hard FETCH_HEAD } pkg_source_tar() {