Permalink
Browse files

Merge branch 'feature/suggest_remote_branches' into blove

  • Loading branch information...
2 parents c697491 + e2eb4e9 commit a66956794305a350a3a5ca65eb03c0494d6c3182 @bloveridge committed Feb 28, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 git-flow-init
View
@@ -113,7 +113,8 @@ cmd_default() {
default_suggestion=
for guess in $(gitflow_config_get gitflow.branch.master) \
'production' 'main' 'master'; do
- if git_local_branch_exists "$guess"; then
+ if git_local_branch_exists "$guess" || \
+ git_remote_branch_exists "origin/$guess"; then
default_suggestion="$guess"
break
fi
@@ -166,7 +167,8 @@ cmd_default() {
default_suggestion=
for guess in $(gitflow_config_get gitflow.branch.develop) \
'develop' 'int' 'integration' 'master'; do
- if git_local_branch_exists "$guess"; then
+ if git_local_branch_exists "$guess" || \
+ git_remote_branch_exists "origin/$guess"; then
default_suggestion="$guess"
break
fi

0 comments on commit a669567

Please sign in to comment.