From c0b4b9673e8fdaf3b250268e002dd4eba145238a Mon Sep 17 00:00:00 2001 From: Brendan McDonnell <35789100+bmcdonnell@users.noreply.github.com> Date: Wed, 20 Feb 2019 20:16:01 -0500 Subject: [PATCH 1/3] Add missing sub-subcommands to subcommand help outputs --- git-flow-bugfix | 1 + git-flow-feature | 1 + git-flow-hotfix | 3 +++ git-flow-release | 2 ++ git-flow-support | 1 + 5 files changed, 8 insertions(+) diff --git a/git-flow-bugfix b/git-flow-bugfix index e27f05cf..6af536d0 100644 --- a/git-flow-bugfix +++ b/git-flow-bugfix @@ -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. diff --git a/git-flow-feature b/git-flow-feature index 0feeb4e6..3a697fee 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -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. diff --git a/git-flow-hotfix b/git-flow-hotfix index 514a5099..8b3e01ac 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -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. diff --git a/git-flow-release b/git-flow-release index 3c10f5a7..8f17dded 100644 --- a/git-flow-release +++ b/git-flow-release @@ -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. diff --git a/git-flow-support b/git-flow-support index 2f2c2ff5..598fd4ed 100644 --- a/git-flow-support +++ b/git-flow-support @@ -50,6 +50,7 @@ usage() { OPTIONS_SPEC="\ git flow support [list] git flow support start +git flow support rebase Manage your support branches. From d6e43fdb37be64af5a3561f63e36b58913e7bc9a Mon Sep 17 00:00:00 2001 From: Brendan McDonnell <35789100+bmcdonnell@users.noreply.github.com> Date: Wed, 20 Feb 2019 20:16:43 -0500 Subject: [PATCH 2/3] Correct rename help outputs --- git-flow-bugfix | 2 +- git-flow-feature | 2 +- git-flow-hotfix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git-flow-bugfix b/git-flow-bugfix index 6af536d0..039bab20 100644 --- a/git-flow-bugfix +++ b/git-flow-bugfix @@ -832,7 +832,7 @@ r,[no]remote Delete remote branch cmd_rename() { OPTIONS_SPEC="\ -git flow bugfix rename [] +git flow bugfix rename [] Rename a given bugfix branch -- diff --git a/git-flow-feature b/git-flow-feature index 3a697fee..c1d273f5 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -833,7 +833,7 @@ r,[no]remote Delete remote branch cmd_rename() { OPTIONS_SPEC="\ -git flow feature rename [] +git flow feature rename [] Rename a given feature branch -- diff --git a/git-flow-hotfix b/git-flow-hotfix index 8b3e01ac..2082bc75 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -735,7 +735,7 @@ r,[no]remote Delete remote branch cmd_rename() { OPTIONS_SPEC="\ -git flow hotfix rename [] +git flow hotfix rename [] Rename a given hotfix branch -- From cf3885ed0becd10227da2e997b641deee42a1f36 Mon Sep 17 00:00:00 2001 From: Brendan McDonnell <35789100+bmcdonnell@users.noreply.github.com> Date: Wed, 20 Feb 2019 21:02:44 -0500 Subject: [PATCH 3/3] Change `git flow {bugfix,feature,hotfix} rename` argument order to `[] `, following git conventions (like `git branch --move [] `) --- git-flow-bugfix | 2 +- git-flow-feature | 2 +- git-flow-hotfix | 2 +- gitflow-common | 14 ++++++++------ 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/git-flow-bugfix b/git-flow-bugfix index 039bab20..f6b86354 100644 --- a/git-flow-bugfix +++ b/git-flow-bugfix @@ -832,7 +832,7 @@ r,[no]remote Delete remote branch cmd_rename() { OPTIONS_SPEC="\ -git flow bugfix rename [] +git flow bugfix rename [] Rename a given bugfix branch -- diff --git a/git-flow-feature b/git-flow-feature index c1d273f5..c8b56bd7 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -833,7 +833,7 @@ r,[no]remote Delete remote branch cmd_rename() { OPTIONS_SPEC="\ -git flow feature rename [] +git flow feature rename [] Rename a given feature branch -- diff --git a/git-flow-hotfix b/git-flow-hotfix index 2082bc75..05dd3273 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -735,7 +735,7 @@ r,[no]remote Delete remote branch cmd_rename() { OPTIONS_SPEC="\ -git flow hotfix rename [] +git flow hotfix rename [] Rename a given hotfix branch -- diff --git a/gitflow-common b/gitflow-common index 0ad52648..0084f85d 100644 --- a/gitflow-common +++ b/gitflow-common @@ -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}