|
|
|
@ -89,13 +89,12 @@ function install_equalizer_deps() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function delete_local_branch() { |
|
|
|
|
( |
|
|
|
|
cd ~/equalizer.git; ( |
|
|
|
|
# set -o errexit # Can't do this inside a function |
|
|
|
|
set -o nounset |
|
|
|
|
set -o pipefail |
|
|
|
|
branch=${1:+feature/$1} |
|
|
|
|
branch=${branch:-$(get_current_branch_name)} || exit "$?" |
|
|
|
|
cd ~/equalizer.git |
|
|
|
|
worktree="$(git worktree list --porcelain | grep -B2 ${branch} | cut -d' ' -f2 | head -n1)" || exit "$?" |
|
|
|
|
git worktree remove "$worktree" || exit "$?" |
|
|
|
|
git branch -d "$branch" || exit "$?" |
|
|
|
|