Allow for setting back a prefix to '' (empty string) by entering '-'
(dash), since the empty string '' means "take the default suggestion" already. Only needed in rare cases.
This commit is contained in:
parent
f476d260b0
commit
9ddb1dca68
1 changed files with 5 additions and 5 deletions
|
@ -187,35 +187,35 @@ cmd_default() {
|
||||||
default_suggestion=$(git config --get gitflow.prefix.feature || echo feature/)
|
default_suggestion=$(git config --get gitflow.prefix.feature || echo feature/)
|
||||||
echo "Feature branches? [$default_suggestion] \c"
|
echo "Feature branches? [$default_suggestion] \c"
|
||||||
read answer
|
read answer
|
||||||
prefix=${answer:-$default_suggestion}
|
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
|
||||||
git config gitflow.prefix.feature "$prefix"
|
git config gitflow.prefix.feature "$prefix"
|
||||||
|
|
||||||
# Release branches
|
# Release branches
|
||||||
default_suggestion=$(git config --get gitflow.prefix.release || echo release/)
|
default_suggestion=$(git config --get gitflow.prefix.release || echo release/)
|
||||||
echo "Release branches? [$default_suggestion] \c"
|
echo "Release branches? [$default_suggestion] \c"
|
||||||
read answer
|
read answer
|
||||||
prefix=${answer:-$default_suggestion}
|
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
|
||||||
git config gitflow.prefix.release "$prefix"
|
git config gitflow.prefix.release "$prefix"
|
||||||
|
|
||||||
# Hotfix branches
|
# Hotfix branches
|
||||||
default_suggestion=$(git config --get gitflow.prefix.hotfix || echo hotfix/)
|
default_suggestion=$(git config --get gitflow.prefix.hotfix || echo hotfix/)
|
||||||
echo "Hotfix branches? [$default_suggestion] \c"
|
echo "Hotfix branches? [$default_suggestion] \c"
|
||||||
read answer
|
read answer
|
||||||
prefix=${answer:-$default_suggestion}
|
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
|
||||||
git config gitflow.prefix.hotfix "$prefix"
|
git config gitflow.prefix.hotfix "$prefix"
|
||||||
|
|
||||||
# Support branches
|
# Support branches
|
||||||
default_suggestion=$(git config --get gitflow.prefix.support || echo support/)
|
default_suggestion=$(git config --get gitflow.prefix.support || echo support/)
|
||||||
echo "Support branches? [$default_suggestion] \c"
|
echo "Support branches? [$default_suggestion] \c"
|
||||||
read answer
|
read answer
|
||||||
prefix=${answer:-$default_suggestion}
|
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
|
||||||
git config gitflow.prefix.support "$prefix"
|
git config gitflow.prefix.support "$prefix"
|
||||||
|
|
||||||
# Version tag prefix
|
# Version tag prefix
|
||||||
default_suggestion=$(git config --get gitflow.prefix.versiontag || echo "")
|
default_suggestion=$(git config --get gitflow.prefix.versiontag || echo "")
|
||||||
echo "Version tag prefix? [$default_suggestion] \c"
|
echo "Version tag prefix? [$default_suggestion] \c"
|
||||||
read answer
|
read answer
|
||||||
prefix=${answer:-$default_suggestion}
|
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
|
||||||
git config gitflow.prefix.versiontag "$prefix"
|
git config gitflow.prefix.versiontag "$prefix"
|
||||||
|
|
||||||
# TODO: what to do with origin?
|
# TODO: what to do with origin?
|
||||||
|
|
Loading…
Reference in a new issue