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
  • Loading branch information
Marcin Morys committed Apr 4, 2024
1 parent aed067f commit e0dc310
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 e0dc310

Please sign in to comment.