fix(git): fix check in `gbds` function

master
Marc Cornellà 2 years ago
parent 207d29b716
commit f79647dba5
No known key found for this signature in database
GPG Key ID: 314585E776A9C1B
  1. 2
      plugins/git/git.plugin.zsh

@ -141,7 +141,7 @@ function gbds() {
git for-each-ref refs/heads/ "--format=%(refname:short)" | \
while read branch; do
local merge_base=$(git merge-base $default_branch $branch)
if [[ '-*' == $(git cherry $default_branch $(git commit-tree $(git rev-parse $branch\^{tree}) -p $merge_base -m _)) ]]; then
if [[ $(git cherry $default_branch $(git commit-tree $(git rev-parse $branch\^{tree}) -p $merge_base -m _)) = -* ]]; then
git branch -D $branch
fi
done

Loading…
Cancel
Save