Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
Fix: stop using empty pathspecs
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartherbert committed Jan 31, 2018
1 parent c4576c2 commit ddf9ee1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions hubflow-common
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,11 @@ hubflow_branch_pop() {
# make sure the stack is not empty
[[ $BRANCH_STACK_SP != 0 ]] || die "Internal error: attempt to pop from empty BRANCH_STACK"

# pop the branch from the stack
local popped_branch=${BRANCH_STACK[$BRANCH_STACK_SP]}
BRANCH_STACK[$BRANCH_STACK_SP]=
let "BRANCH_STACK_SP -= 1"
# pop the branch from the stack
local tmp_branch_sp=$BRANCH_STACK_SP
let "BRANCH_STACK_SP -= 1"
local popped_branch=${BRANCH_STACK[$BRANCH_STACK_SP]}
unset BRANCH_STACK[$tmp_branch_sp]

# do we need to switch branch too?
hubflow_change_branch "$popped_branch"
Expand Down

0 comments on commit ddf9ee1

Please sign in to comment.