diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 16568f222..0b6b3ee1f 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -137,8 +137,9 @@ function gbda() { # Copied and modified from James Roeder (jmaroeder) under MIT License # https://github.com/jmaroeder/plugin-git/blob/216723ef4f9e8dde399661c39c80bdf73f4076c4/functions/gbda.fish function gbds() { - local default_branch=$(git_main_branch) - (( ! $? )) || default_branch=$(git_develop_branch) + local default_branch + default_branch=$(git_main_branch) \ + || default_branch=$(git_develop_branch) git for-each-ref refs/heads/ "--format=%(refname:short)" | \ while read branch; do