Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Restores previous default branch prefixes, closes #393 #394

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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