Commit 9ddb1dca authored by Vincent Driessen's avatar Vincent Driessen

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.
parent f476d260
......@@ -187,35 +187,35 @@ cmd_default() {
default_suggestion=$(git config --get gitflow.prefix.feature || echo feature/)
echo "Feature branches? [$default_suggestion] \c"
read answer
prefix=${answer:-$default_suggestion}
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
git config gitflow.prefix.feature "$prefix"
# Release branches
default_suggestion=$(git config --get gitflow.prefix.release || echo release/)
echo "Release branches? [$default_suggestion] \c"
read answer
prefix=${answer:-$default_suggestion}
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
git config gitflow.prefix.release "$prefix"
# Hotfix branches
default_suggestion=$(git config --get gitflow.prefix.hotfix || echo hotfix/)
echo "Hotfix branches? [$default_suggestion] \c"
read answer
prefix=${answer:-$default_suggestion}
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
git config gitflow.prefix.hotfix "$prefix"
# Support branches
default_suggestion=$(git config --get gitflow.prefix.support || echo support/)
echo "Support branches? [$default_suggestion] \c"
read answer
prefix=${answer:-$default_suggestion}
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
git config gitflow.prefix.support "$prefix"
# Version tag prefix
default_suggestion=$(git config --get gitflow.prefix.versiontag || echo "")
echo "Version tag prefix? [$default_suggestion] \c"
read answer
prefix=${answer:-$default_suggestion}
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
git config gitflow.prefix.versiontag "$prefix"
# TODO: what to do with origin?
......
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