Adding extra instructions when running the list option without any corresponding branches found.
This commit is contained in:
parent
a2baef9587
commit
b681b4522d
4 changed files with 17 additions and 0 deletions
|
@ -66,6 +66,10 @@ cmd_list() {
|
|||
feature_branches=$(echo "$(git_local_branches)" | grep "^$PREFIX")
|
||||
if [ -z "$feature_branches" ]; then
|
||||
warn "No feature branches exist."
|
||||
warn ""
|
||||
warn "You can start a new feature branch:"
|
||||
warn ""
|
||||
warn " git flow feature start <name> [<base>]"
|
||||
exit 0
|
||||
fi
|
||||
current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
|
||||
|
|
|
@ -62,6 +62,10 @@ cmd_list() {
|
|||
hotfix_branches=$(echo "$(git_local_branches)" | grep "^$PREFIX")
|
||||
if [ -z "$hotfix_branches" ]; then
|
||||
warn "No hotfix branches exist."
|
||||
warn ""
|
||||
warn "You can start a new hotfix branch:"
|
||||
warn ""
|
||||
warn " git flow hotfix start <name> [<base>]"
|
||||
exit 0
|
||||
fi
|
||||
current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
|
||||
|
|
|
@ -62,6 +62,11 @@ cmd_list() {
|
|||
release_branches=$(echo "$(git_local_branches)" | grep "^$PREFIX")
|
||||
if [ -z "$release_branches" ]; then
|
||||
warn "No release branches exist."
|
||||
warn ""
|
||||
warn "You can start a new release branch:"
|
||||
warn ""
|
||||
warn " git flow release start <name> [<base>]"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
@ -64,6 +64,10 @@ cmd_list() {
|
|||
support_branches=$(echo "$(git_local_branches)" | grep "^$PREFIX")
|
||||
if [ -z "$support_branches" ]; then
|
||||
warn "No support branches exist."
|
||||
warn ""
|
||||
warn "You can start a new support branch:"
|
||||
warn ""
|
||||
warn " git flow support start <name> <base>"
|
||||
exit 0
|
||||
fi
|
||||
current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
|
||||
|
|
Loading…
Reference in a new issue