petervanderdoes/gitflow — pull request #28 by baby-gnu (2012-07-27 22:21:15+00:00)
Title: Make production release branch optional

The production release branch can be marked optional with the new git
configuration

git config gitflow.branch.master.disabled true
git flow init -m
git flow init --nomaster

The -m/--nomaster option is overridden by the -f/--force one.

If the repository is empty at init time or -f/--force option is passed a
confirmation to disable the production release branch is asked.

The same confirmation is asked if the production release branch name is
the same as the "next release" development branch one.

The user can enable the production release branch by forcing a new
initialization or with plain git configuration.

This is an implementation of #231 to improve my solution to #133.

* gitflow-common (gitflow_has_master_disabled): New helper to check if
the production release branch is disabled.
(gitflow_is_initialized): Manage disabled production release branch.

* git-flow-init (usage): add -m flag.
(cmd_default): Add -m flag.
Permit to disable the production release branch, either by command line
option or if the production release branch name is equal to the
development branch name.
Permit to enable a separate production release branch when user force
the initialization.

* git-flow-release: New variable "$UPSTREAM_BRANCH" to avoid lots of call
to gitflow_has_master_disabled.
(cmd_finish): Merge to "$UPSTREAM_BRANCH", do not do backmerge and push
the development branch if the production release branch is disabled.
(cmd_branch): Merge to "$UPSTREAM_BRANCH".
(cmd_delete): Check is the release branch is merge in the production
release branch only if it's not disabled.

* git-flow-hotfix: New variable "$UPSTREAM_BRANCH" to avoid lots of call
to gitflow_has_master_disabled.
(cmd_list): Base is on "$UPSTREAM_BRANCH".
(cmd_finish): Merge to "$UPSTREAM_BRANCH", do not do backmerge and push
the development branch if the production release branch is disabled.
(cmd_delete): Check is the release branch is merge in the production
release branch only if it's not disabled.

* git-flow-support: New variable "$UPSTREAM_BRANCH" to avoid lots of call
to gitflow_has_master_disabled.
(cmd_list): Base is on "$UPSTREAM_BRANCH".
(cmd_start): Ditoo.