Commit 46f9998f authored by Vincent Driessen's avatar Vincent Driessen

Don't stop the script when the release branch is the current branch.

Simply step aside to the master branch instead.
parent ddd9dfe9
......@@ -149,12 +149,6 @@ require_no_existing_release_branches() {
die "There is an existing release branch ($first_branch). Finish that one first."
}
require_not_on_release_branch() {
if [ "$BRANCH" = "$(git_current_branch)"]; then
die "You cannot be in the '$BRANCH' branch when you finish it."
fi
}
cmd_start() {
DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
parse_args "$@"
......@@ -210,7 +204,6 @@ cmd_finish() {
# sanity checks
require_branch "$BRANCH"
require_clean_working_tree
require_not_on_release_branch
if flag fetch; then
git fetch -q "$ORIGIN" "$MASTER_BRANCH" || \
die "Could not fetch $MASTER_BRANCH from $ORIGIN."
......@@ -264,6 +257,9 @@ cmd_finish() {
# delete branch
if noflag keep; then
if [ "$BRANCH" = "$(git_current_branch)" ]; then
git checkout "$MASTER_BRANCH"
fi
git branch -d "$BRANCH"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment