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")
|
feature_branches=$(echo "$(git_local_branches)" | grep "^$PREFIX")
|
||||||
if [ -z "$feature_branches" ]; then
|
if [ -z "$feature_branches" ]; then
|
||||||
warn "No feature branches exist."
|
warn "No feature branches exist."
|
||||||
|
warn ""
|
||||||
|
warn "You can start a new feature branch:"
|
||||||
|
warn ""
|
||||||
|
warn " git flow feature start <name> [<base>]"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
|
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")
|
hotfix_branches=$(echo "$(git_local_branches)" | grep "^$PREFIX")
|
||||||
if [ -z "$hotfix_branches" ]; then
|
if [ -z "$hotfix_branches" ]; then
|
||||||
warn "No hotfix branches exist."
|
warn "No hotfix branches exist."
|
||||||
|
warn ""
|
||||||
|
warn "You can start a new hotfix branch:"
|
||||||
|
warn ""
|
||||||
|
warn " git flow hotfix start <name> [<base>]"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
|
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")
|
release_branches=$(echo "$(git_local_branches)" | grep "^$PREFIX")
|
||||||
if [ -z "$release_branches" ]; then
|
if [ -z "$release_branches" ]; then
|
||||||
warn "No release branches exist."
|
warn "No release branches exist."
|
||||||
|
warn ""
|
||||||
|
warn "You can start a new release branch:"
|
||||||
|
warn ""
|
||||||
|
warn " git flow release start <name> [<base>]"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,10 @@ cmd_list() {
|
||||||
support_branches=$(echo "$(git_local_branches)" | grep "^$PREFIX")
|
support_branches=$(echo "$(git_local_branches)" | grep "^$PREFIX")
|
||||||
if [ -z "$support_branches" ]; then
|
if [ -z "$support_branches" ]; then
|
||||||
warn "No support branches exist."
|
warn "No support branches exist."
|
||||||
|
warn ""
|
||||||
|
warn "You can start a new support branch:"
|
||||||
|
warn ""
|
||||||
|
warn " git flow support start <name> <base>"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
|
current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
|
||||||
|
|
Loading…
Reference in a new issue