Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restores previous default branch prefixes #22

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions git-flow-init
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ file= use given config file
DEFINE_boolean 'global' false 'use global config file'
DEFINE_boolean 'system' false 'use system config file'
DEFINE_string 'file' "" 'use given config file'
DEFINE_string 'feature' "" 'feature branches' p
DEFINE_string 'bugfix' "" 'bugfix branches' b
DEFINE_string 'release' "" 'release branches' r
DEFINE_string 'hotfix' "" 'hotfix branches' x
DEFINE_string 'support' "" 'support branches' s
DEFINE_string 'feature' "feature/" 'feature branches' p
DEFINE_string 'bugfix' "bugfix/" 'bugfix branches' b
DEFINE_string 'release' "release/" 'release branches' r
DEFINE_string 'hotfix' "hotfix/" 'hotfix branches' x
DEFINE_string 'support' "support/" 'support branches' s
DEFINE_string 'tag' "" 'version tag prefix' t

# Override defaults with values from config
Expand Down Expand Up @@ -306,7 +306,7 @@ file= use given config file

# Feature branches
if ! git config --get gitflow.prefix.feature >/dev/null 2>&1 || flag force; then
default_suggestion=$(echo $FLAGS_feature || git config --get gitflow.prefix.feature || echo feature/)
default_suggestion=$(git config --get gitflow.prefix.feature || echo $FLAGS_feature)
printf "Feature branches? [$default_suggestion] "
if noflag defaults; then
read answer
Expand All @@ -319,7 +319,7 @@ file= use given config file

# Bugfix branches
if ! git config --get gitflow.prefix.bugfix >/dev/null 2>&1 || flag force; then
default_suggestion=$(echo $FLAGS_bugfix || git config --get gitflow.prefix.bugfix || echo bugfix/)
default_suggestion=$(git config --get gitflow.prefix.bugfix || echo $FLAGS_bugfix)
printf "Bugfix branches? [$default_suggestion] "
if noflag defaults; then
read answer
Expand All @@ -332,7 +332,7 @@ file= use given config file

# Release branches
if ! git config --get gitflow.prefix.release >/dev/null 2>&1 || flag force; then
default_suggestion=$(echo $FLAGS_release || git config --get gitflow.prefix.release || echo release/)
default_suggestion=$(git config --get gitflow.prefix.release || echo $FLAGS_release)
printf "Release branches? [$default_suggestion] "
if noflag defaults; then
read answer
Expand All @@ -345,7 +345,7 @@ file= use given config file

# Hotfix branches
if ! git config --get gitflow.prefix.hotfix >/dev/null 2>&1 || flag force; then
default_suggestion=$(echo $FLAGS_hotfix || git config --get gitflow.prefix.hotfix || echo hotfix/)
default_suggestion=$(git config --get gitflow.prefix.hotfix || echo $FLAGS_hotfix)
printf "Hotfix branches? [$default_suggestion] "
if noflag defaults; then
read answer
Expand All @@ -358,7 +358,7 @@ file= use given config file

# Support branches
if ! git config --get gitflow.prefix.support >/dev/null 2>&1 || flag force; then
default_suggestion=$(echo $FLAGS_support || git config --get gitflow.prefix.support || echo support/)
default_suggestion=$(git config --get gitflow.prefix.support || echo $FLAGS_support)
printf "Support branches? [$default_suggestion] "
if noflag defaults; then
read answer
Expand All @@ -371,7 +371,7 @@ file= use given config file

# Version tag prefix
if ! git config --get gitflow.prefix.versiontag >/dev/null 2>&1 || flag force; then
default_suggestion=$(echo $FLAGS_tag || git config --get gitflow.prefix.versiontag || echo "")
default_suggestion=$(git config --get gitflow.prefix.versiontag || echo $FLAGS_tag)
printf "Version tag prefix? [$default_suggestion] "
if noflag defaults; then
read answer
Expand Down