From e9930c5f718f5f440062ba2ac1cfe3693bee4fb8 Mon Sep 17 00:00:00 2001 From: Jiang Youxin Date: Wed, 13 Feb 2013 12:45:07 +0800 Subject: [PATCH] fix a bug that cause failure to delete a branch, when trying to finish a hotfix after resolve conflicts manully. fix some comment bugs in git-flow-hotfix --- git-flow-hotfix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/git-flow-hotfix b/git-flow-hotfix index ba485f6fe..826a52205 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -284,8 +284,8 @@ cmd_finish() { fi if noflag notag; then - # try to tag the release - # in case a previous attempt to finish this release branch has failed, + # try to tag the hotfix + # in case a previous attempt to finish this hotfix branch has failed, # but the tag was set successful, we skip it now local tagname=$VERSION_PREFIX$VERSION if ! git_tag_exists "$tagname"; then @@ -302,10 +302,9 @@ cmd_finish() { # try to merge into develop # in case a previous attempt to finish this release branch has failed, # but the merge into develop was successful, we skip it now + git_do checkout "$DEVELOP_BRANCH" || \ + die "Could not check out $DEVELOP_BRANCH." if ! git_is_branch_merged_into "$BRANCH" "$DEVELOP_BRANCH"; then - git_do checkout "$DEVELOP_BRANCH" || \ - die "Could not check out $DEVELOP_BRANCH." - # TODO: Actually, accounting for 'git describe' pays, so we should # ideally git merge --no-ff $tagname here, instead! git_do merge --no-ff "$BRANCH" || \ @@ -331,7 +330,9 @@ cmd_finish() { echo echo "Summary of actions:" - echo "- Latest objects have been fetched from '$ORIGIN'" + if flag fetch; then + echo "- Latest objects have been fetched from '$ORIGIN'" + fi echo "- Hotfix branch has been merged into '$MASTER_BRANCH'" if noflag notag; then echo "- The hotfix was tagged '$VERSION_PREFIX$VERSION'"