From f79647dba5df47cd87917bcf527c5825be6511dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Thu, 19 Oct 2023 22:05:03 +0200 Subject: [PATCH] fix(git): fix check in `gbds` function --- plugins/git/git.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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