Commit c26286e3 authored by Vincent Driessen's avatar Vincent Driessen

Merge pull request #222 from sinbad/feature/fix_default_behaviour

Fix init -d behaviour when master branch exists, and 1+ other branches exist, but develop does not
parents ab7fda21 26327787
...@@ -153,11 +153,17 @@ cmd_default() { ...@@ -153,11 +153,17 @@ cmd_default() {
default_suggestion= default_suggestion=
for guess in $(git config --get gitflow.branch.develop) \ for guess in $(git config --get gitflow.branch.develop) \
'develop' 'int' 'integration' 'master'; do 'develop' 'int' 'integration' 'master'; do
if git_local_branch_exists "$guess"; then if git_local_branch_exists "$guess" && [ "$guess" != "$master_branch" ]; then
default_suggestion="$guess" default_suggestion="$guess"
break break
fi fi
done done
if [ -z $default_suggestion ]; then
should_check_existence=NO
default_suggestion=$(git config --get gitflow.branch.develop || echo develop)
fi
fi fi
printf "Branch name for \"next release\" development: [$default_suggestion] " printf "Branch name for \"next release\" development: [$default_suggestion] "
......
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