Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Bugfix/help text and reorder rename args #403

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion git-flow-bugfix
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ git flow bugfix rebase
git flow bugfix checkout
git flow bugfix pull
git flow bugfix delete
git flow bugfix rename

Manage your bugfix branches.

Expand Down Expand Up @@ -831,7 +832,7 @@ r,[no]remote Delete remote branch

cmd_rename() {
OPTIONS_SPEC="\
git flow bugfix rename <new_name> [<new_name>]
git flow bugfix rename [<old_name>] <new_name>

Rename a given bugfix branch
--
Expand Down
3 changes: 2 additions & 1 deletion git-flow-feature
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ git flow feature rebase
git flow feature checkout
git flow feature pull
git flow feature delete
git flow feature rename

Manage your feature branches.

Expand Down Expand Up @@ -832,7 +833,7 @@ r,[no]remote Delete remote branch

cmd_rename() {
OPTIONS_SPEC="\
git flow feature rename <new_name> [<new_name>]
git flow feature rename [<old_name>] <new_name>

Rename a given feature branch
--
Expand Down
5 changes: 4 additions & 1 deletion git-flow-hotfix
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ git flow hotfix start
git flow hotfix finish
git flow hotfix publish
git flow hotfix delete
git flow hotfix rebase
git flow hotfix track
git flow hotfix rename

Manage your hotfix branches.

Expand Down Expand Up @@ -732,7 +735,7 @@ r,[no]remote Delete remote branch

cmd_rename() {
OPTIONS_SPEC="\
git flow hotfix rename <new_name> [<new_name>]
git flow hotfix rename [<old_name>] <new_name>

Rename a given hotfix branch
--
Expand Down
2 changes: 2 additions & 0 deletions git-flow-release
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,10 @@ usage() {
git flow release [list]
git flow release start
git flow release finish
git flow release branch
git flow release publish
git flow release track
git flow release rebase
git flow release delete

Manage your release branches.
Expand Down
1 change: 1 addition & 0 deletions git-flow-support
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ usage() {
OPTIONS_SPEC="\
git flow support [list]
git flow support start
git flow support rebase

Manage your support branches.

Expand Down
14 changes: 8 additions & 6 deletions gitflow-common
Original file line number Diff line number Diff line change
Expand Up @@ -609,15 +609,17 @@ gitflow_rename_branch() {
# read arguments into global variables
if [ -z $1 ]; then
NEW_NAME=''
else
NEW_NAME=$1
fi

if [ -z $2 ]; then
NAME=''
else
NAME=$2
if [ -z $2 ]; then
NAME=''
NEW_NAME=$1
else
NAME=$1
NEW_NAME=$2
fi
fi

BRANCH=${PREFIX}${NAME}
NEW_BRANCH=${PREFIX}${NEW_NAME}

Expand Down