[git] Update git-branch-delete-interactive
so we don't suggest deleting remote branches when `git rev-parse` failed. For example, it could fail if a remote tracking branch is gone.
This commit is contained in:
parent
d371d80af2
commit
f11bb607c5
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ local -a remotes
|
||||||
if (( ${*[(I)(-r|--remotes)]} )); then
|
if (( ${*[(I)(-r|--remotes)]} )); then
|
||||||
remotes=(${^*:#-*})
|
remotes=(${^*:#-*})
|
||||||
else
|
else
|
||||||
remotes=(${(f)"$(command git rev-parse --abbrev-ref ${^*:#-*}@{u} 2>/dev/null)"})
|
remotes=(${(f)"$(command git rev-parse --abbrev-ref ${^*:#-*}@{u} 2>/dev/null)"}) || remotes=()
|
||||||
fi
|
fi
|
||||||
if command git branch --delete ${@} && \
|
if command git branch --delete ${@} && \
|
||||||
(( ${#remotes[@]} )) && \
|
(( ${#remotes[@]} )) && \
|
||||||
|
|
Loading…
Reference in a new issue