Commit b681b452 authored by Randy Merrill's avatar Randy Merrill Committed by Vincent Driessen

Adding extra instructions when running the list option without any corresponding branches found.

parent a2baef95
...@@ -66,6 +66,10 @@ cmd_list() { ...@@ -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() { ...@@ -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() { ...@@ -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() { ...@@ -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')
......
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