From e0dc310617078365cf113f89bac6a51bcef7327a Mon Sep 17 00:00:00 2001 From: Marcin Morys Date: Thu, 4 Apr 2024 16:06:06 -0400 Subject: [PATCH] fix: track all branches before unshallowing to allow checking out non-master --- zap.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/zap.zsh b/zap.zsh index 671d2f2..e9f494d 100644 --- a/zap.zsh +++ b/zap.zsh @@ -43,6 +43,7 @@ function plug() { echo -e "\e[1A\e[K⚡ Zap installed $plugin_name" fi [[ -n "$git_ref" ]] && { + git -C "$plugin_dir" remote set-branches origin '*' > /dev/null 2>&1 git -C "$plugin_dir" pull --unshallow > /dev/null 2>&1 git -C "$plugin_dir" checkout "$git_ref" > /dev/null 2>&1 || { echo "❌ Failed to checkout $git_ref"; return 13 } }