From 6a00546b3b2d24337a2151ff4b858f139b392268 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 28 Aug 2021 15:48:59 +0300 Subject: [PATCH] kiss: simplify pkg_source_git --- kiss | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kiss b/kiss index 544288c..e05e958 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%[#@]*}" - # Only fetch latest changes if not [#]. - case $2 in *"#$com") ;; *) - git fetch -t --filter=tree:0 origin "$com" || git fetch -t - esac + git fetch -t origin "$com" || + git fetch -t git -c advice.detachedHead=0 checkout "${com:-FETCH_HEAD}" }