diff options
author | Marc Cornellà <marc@mcornella.com> | 2023-10-19 22:05:03 +0200 |
---|---|---|
committer | Marc Cornellà <marc@mcornella.com> | 2023-10-19 22:05:03 +0200 |
commit | f79647dba5df47cd87917bcf527c5825be6511dc (patch) | |
tree | 5b783f7885131fcbdd44cde02693d9d094e8721d | |
parent | 207d29b716301c77392ae140b1482eeba44e9102 (diff) | |
download | zsh-f79647dba5df47cd87917bcf527c5825be6511dc.tar.gz zsh-f79647dba5df47cd87917bcf527c5825be6511dc.tar.bz2 zsh-f79647dba5df47cd87917bcf527c5825be6511dc.zip |
fix(git): fix check in `gbds` function
-rw-r--r-- | plugins/git/git.plugin.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 5ec2bbe2b..eef538b75 100644 --- a/plugins/git/git.plugin.zsh +++ b/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 |