1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-18 10:22:00 +00:00

fix(git): fix check in gbds function

This commit is contained in:
Marc Cornellà 2023-10-19 22:05:03 +02:00
parent 207d29b716
commit f79647dba5
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B

View file

@ -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