Skip to content

Commit

Permalink
fix a bug that cause failure to delete a branch, when trying to finis…
Browse files Browse the repository at this point in the history
…h a hotfix after resolve conflicts manully.

fix some comment bugs in git-flow-hotfix
  • Loading branch information
Jiang Youxin committed Feb 13, 2013
1 parent 15aab26 commit e9930c5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions git-flow-hotfix
Expand Up @@ -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
Expand All @@ -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" || \
Expand All @@ -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'"
Expand Down

0 comments on commit e9930c5

Please sign in to comment.