Skip to content

Commit

Permalink
added a -D flag to the git flow finish command to try extra hard to d…
Browse files Browse the repository at this point in the history
…elete the local branch after finishing the feature
  • Loading branch information
chad3814 committed Oct 25, 2011
1 parent be5dabf commit 9c5c806
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions git-flow-feature
Expand Up @@ -44,7 +44,7 @@ PREFIX=$(git config --get gitflow.prefix.feature)
usage() {
echo "usage: git flow feature [list] [-v]"
echo " git flow feature start [-F] <name> [<base>]"
echo " git flow feature finish [-rFk] [<name|nameprefix>]"
echo " git flow feature finish [-rFkD] [<name|nameprefix>]"
echo " git flow feature publish <name>"
echo " git flow feature track <name>"
echo " git flow feature diff [<name|nameprefix>]"
Expand Down Expand Up @@ -231,6 +231,7 @@ cmd_finish() {
DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
DEFINE_boolean rebase false "rebase instead of merge" r
DEFINE_boolean keep false "keep branch after performing finish" k
DEFINE_boolean hard_delete false "try extra hard to delete the branch after performing finish" D
parse_args "$@"
expand_nameprefix_arg_or_current

Expand Down Expand Up @@ -346,7 +347,11 @@ helper_finish_cleanup() {


if noflag keep; then
git branch -d "$BRANCH"
if flag hard_delete; then
git branch -D "$BRANCH"
else
git branch -d "$BRANCH"
fi
fi

echo
Expand Down

0 comments on commit 9c5c806

Please sign in to comment.