From 7c01d98f3d59c456ff12eb42950431f5cf80a6f3 Mon Sep 17 00:00:00 2001 From: Tsarevich Dmitry Date: Fri, 22 Jun 2018 20:09:53 +0300 Subject: [PATCH] Fix hubflow_branch_pop_no_checkout stack cleanup By analogy with https://github.com/datasift/gitflow/commit/ddf9ee1898a947e56b5812a9d708d9583afb7c65#diff-f15ff19190e4b76e38d6307a1786372f clean correct branch stack entry --- hubflow-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hubflow-common b/hubflow-common index 1e01a42eb..34e2be11f 100644 --- a/hubflow-common +++ b/hubflow-common @@ -268,7 +268,7 @@ hubflow_branch_pop_no_checkout() { [[ $BRANCH_STACK_SP != 0 ]] || die "Internal error: attempt to pop from empty BRANCH_STACK" # pop the branch from the stack - BRANCH_STACK[$BRANCH_STACK_SP]= + BRANCH_STACK[$BRANCH_STACK_SP-1]= let "BRANCH_STACK_SP -= 1" }