Allow new feature branches in dirty working trees.
Before this change, `git-flow feature start` would nag about the working tree being dirty and disallow continuation. Then, there were two alternatives: - stash away your changes manually, create the new branch, restore the stash; or - use `git-flow feature start -f` to force creation There is absolutely no good reason for git-flow to forbid this creation, as git allows it already. Therefore, the -f behaviour is now the default, without an option to turn that behaviour off. Git takes care of unsafe situations again now.
This commit is contained in:
parent
e761e355f4
commit
4132de9ec4
1 changed files with 0 additions and 4 deletions
|
@ -172,15 +172,11 @@ parse_args() {
|
||||||
|
|
||||||
cmd_start() {
|
cmd_start() {
|
||||||
DEFINE_boolean fetch false 'fetch from origin before performing local operation' F
|
DEFINE_boolean fetch false 'fetch from origin before performing local operation' F
|
||||||
DEFINE_boolean force false 'force creation of feature branch (ignores dirty working tree)' f
|
|
||||||
parse_args "$@"
|
parse_args "$@"
|
||||||
BASE=${2:-$DEVELOP_BRANCH}
|
BASE=${2:-$DEVELOP_BRANCH}
|
||||||
require_name_arg
|
require_name_arg
|
||||||
|
|
||||||
# sanity checks
|
# sanity checks
|
||||||
if noflag force; then
|
|
||||||
require_clean_working_tree
|
|
||||||
fi
|
|
||||||
require_branch_absent "$BRANCH"
|
require_branch_absent "$BRANCH"
|
||||||
|
|
||||||
# update the local repo with remote changes, if asked
|
# update the local repo with remote changes, if asked
|
||||||
|
|
Loading…
Reference in a new issue