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.
diff --git a/git-flow-feature b/git-flow-feature
index d37857b..45a821b 100644
--- a/git-flow-feature
+++ b/git-flow-feature
@@ -172,15 +172,11 @@
cmd_start() {
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 "$@"
BASE=${2:-$DEVELOP_BRANCH}
require_name_arg
# sanity checks
- if noflag force; then
- require_clean_working_tree
- fi
require_branch_absent "$BRANCH"
# update the local repo with remote changes, if asked