Skip to content

Commit

Permalink
Adding extra instructions when running the list option without any co…
Browse files Browse the repository at this point in the history
…rresponding branches found.
  • Loading branch information
Zoramite authored and nvie committed Jun 29, 2010
1 parent a2baef9 commit b681b45
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions git-flow-feature
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 4 additions & 0 deletions git-flow-hotfix
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
5 changes: 5 additions & 0 deletions git-flow-release
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions git-flow-support
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit b681b45

Please sign in to comment.