Skip to content

Commit

Permalink
fix: track all branches before unshallowing to allow checking out non…
Browse files Browse the repository at this point in the history
…-master (#182)

Co-authored-by: Marcin Morys <[email protected]>
  • Loading branch information
mmorys and Marcin Morys authored Apr 9, 2024
1 parent aed067f commit 168a05a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions zap.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down

0 comments on commit 168a05a

Please sign in to comment.