From 9ba559f8e9471cbcce778f25a77dd50e2cd00d61 Mon Sep 17 00:00:00 2001 From: Filipe Kiss Date: Wed, 27 Mar 2019 09:42:50 -0300 Subject: [PATCH 01/20] Support Git Environment Credentials --- git-flow-init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-flow-init b/git-flow-init index 4cc7ed9..abb735c 100644 --- a/git-flow-init +++ b/git-flow-init @@ -116,8 +116,8 @@ file= use given config file fi if git_config_bool_exists "user.useconfigonly"; then - user_email=$(git config --get user.email) - user_name=$(git config --get user.name) + user_email=$(git config --get user.email || echo $GIT_AUTHOR_EMAIL) + user_name=$(git config --get user.name || echo $GIT_AUTHOR_NAME) if [ -z "${user_email}" ] || [ -z "${user_name}" ]; then die "Configuration useconfigonly is set but no name and/or email was set" fi From a11f64d8712197ed5c534dca0da9451fb2b0091e Mon Sep 17 00:00:00 2001 From: Shea690901 Date: Sun, 27 Jun 2021 21:08:04 +0200 Subject: [PATCH 02/20] (git-glow-log): fixed help message "git flow log" works not only for feature branches Signed-off-by: Shea690901 --- git-flow-log | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-flow-log b/git-flow-log index a73cbe8..8084b8c 100644 --- a/git-flow-log +++ b/git-flow-log @@ -48,7 +48,7 @@ usage() { OPTIONS_SPEC="\ git flow log -shows current branch log compared to develop +shows current branch log compared to base branch 'git help log' for arguments -- " @@ -69,7 +69,7 @@ cmd_list() { OPTIONS_SPEC="\ git flow feature log [] -Show log on branch since the fork of branch +Show log on current branch since the fork of base branch Options come from git log -- h,help! Show this help From 15a336a95136c2bbeb2c7b7dd417e692b97d508f Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Tue, 7 Dec 2021 23:39:46 -0400 Subject: [PATCH 03/20] git-flow: prefer "-f" readlink(1) option to "-e" Since $0 can be assumed to exist, these two flags behave identially, but readlink(1) from busybox does not support "-e", only GNU Coreutils does. --- git-flow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-flow b/git-flow index f21a3dc..805b9af 100755 --- a/git-flow +++ b/git-flow @@ -46,7 +46,7 @@ fi # git-flow file is a symbolic link case $(uname -s) in Linux) - export GITFLOW_DIR=$(dirname "$(readlink -e "$0")") + export GITFLOW_DIR=$(dirname "$(readlink -f "$0")") ;; FreeBSD|OpenBSD|NetBSD) export FLAGS_GETOPT_CMD='/usr/local/bin/getopt' From 362561ed049f78f8e84ab8f09ce3486bf7e0942c Mon Sep 17 00:00:00 2001 From: ChrisjStone Date: Mon, 3 Jul 2023 23:54:33 -0600 Subject: [PATCH 04/20] docs: update copyright information in source files --- git-flow | 1 + git-flow-bugfix | 1 + git-flow-config | 1 + git-flow-feature | 1 + git-flow-hotfix | 1 + git-flow-init | 1 + git-flow-log | 1 + git-flow-release | 1 + git-flow-support | 1 + git-flow-version | 1 + gitflow-common | 1 + 11 files changed, 11 insertions(+) diff --git a/git-flow b/git-flow index 805b9af..6647ebc 100755 --- a/git-flow +++ b/git-flow @@ -10,6 +10,7 @@ # http://github.com/petervanderdoes/gitflow # # Authors: +# Copyright 2003 CJ Systems. All rights reserved. # Copyright 2012-2019 Peter van der Does. All rights reserved. # # Original Author: diff --git a/git-flow-bugfix b/git-flow-bugfix index 131921b..6c393b3 100644 --- a/git-flow-bugfix +++ b/git-flow-bugfix @@ -11,6 +11,7 @@ # http://github.com/petervanderdoes/gitflow # # Authors: +# Copyright 2003 CJ Systems. All rights reserved. # Copyright 2012-2019 Peter van der Does. All rights reserved. # # Original Author: diff --git a/git-flow-config b/git-flow-config index 44b4c67..9c636e3 100644 --- a/git-flow-config +++ b/git-flow-config @@ -11,6 +11,7 @@ # http://github.com/petervanderdoes/gitflow # # Authors: +# Copyright 2003 CJ Systems. All rights reserved. # Copyright 2012-2019 Peter van der Does. All rights reserved. # # diff --git a/git-flow-feature b/git-flow-feature index ca94e9d..ef248ca 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -11,6 +11,7 @@ # http://github.com/petervanderdoes/gitflow # # Authors: +# Copyright 2003 CJ Systems. All rights reserved. # Copyright 2012-2019 Peter van der Does. All rights reserved. # # Original Author: diff --git a/git-flow-hotfix b/git-flow-hotfix index 0239f8a..0622f48 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -11,6 +11,7 @@ # http://github.com/petervanderdoes/gitflow # # Authors: +# Copyright 2003 CJ Systems. All rights reserved. # Copyright 2012-2019 Peter van der Does. All rights reserved. # # Original Author: diff --git a/git-flow-init b/git-flow-init index 3ec365a..b2f3a63 100644 --- a/git-flow-init +++ b/git-flow-init @@ -11,6 +11,7 @@ # http://github.com/petervanderdoes/gitflow # # Authors: +# Copyright 2003 CJ Systems. All rights reserved. # Copyright 2012-2019 Peter van der Does. All rights reserved. # # Original Author: diff --git a/git-flow-log b/git-flow-log index 8084b8c..f6833e2 100644 --- a/git-flow-log +++ b/git-flow-log @@ -11,6 +11,7 @@ # http://github.com/petervanderdoes/gitflow # # Authors: +# Copyright 2003 CJ Systems. All rights reserved. # Copyright 2012-2019 Peter van der Does. All rights reserved. # # Original Author: diff --git a/git-flow-release b/git-flow-release index 2daed24..17ba752 100644 --- a/git-flow-release +++ b/git-flow-release @@ -11,6 +11,7 @@ # http://github.com/petervanderdoes/gitflow # # Authors: +# Copyright 2003 CJ Systems. All rights reserved. # Copyright 2012-2019 Peter van der Does. All rights reserved. # # Original Author: diff --git a/git-flow-support b/git-flow-support index 8328ff0..c0bc4d2 100644 --- a/git-flow-support +++ b/git-flow-support @@ -11,6 +11,7 @@ # http://github.com/petervanderdoes/gitflow # # Authors: +# Copyright 2003 CJ Systems. All rights reserved. # Copyright 2012-2019 Peter van der Does. All rights reserved. # # Original Author: diff --git a/git-flow-version b/git-flow-version index 44359cd..cb25214 100644 --- a/git-flow-version +++ b/git-flow-version @@ -11,6 +11,7 @@ # http://github.com/petervanderdoes/gitflow # # Authors: +# Copyright 2003 CJ Systems. All rights reserved. # Copyright 2012-2019 Peter van der Does. All rights reserved. # # Original Author: diff --git a/gitflow-common b/gitflow-common index 0084f85..4ff34fd 100644 --- a/gitflow-common +++ b/gitflow-common @@ -11,6 +11,7 @@ # http://github.com/petervanderdoes/gitflow # # Authors: +# Copyright 2003 CJ Systems. All rights reserved. # Copyright 2012-2019 Peter van der Does. All rights reserved. # # Original Author: From e2098dc14052d7a30c0bd37f99912e068fda75b1 Mon Sep 17 00:00:00 2001 From: ChrisjStone Date: Tue, 4 Jul 2023 00:05:02 -0600 Subject: [PATCH 05/20] docs: update repository url in source files --- git-flow | 2 +- git-flow-bugfix | 2 +- git-flow-config | 2 +- git-flow-feature | 2 +- git-flow-hotfix | 2 +- git-flow-init | 2 +- git-flow-log | 2 +- git-flow-release | 2 +- git-flow-support | 2 +- git-flow-version | 2 +- gitflow-common | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/git-flow b/git-flow index 6647ebc..dfe85e4 100755 --- a/git-flow +++ b/git-flow @@ -7,7 +7,7 @@ # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: -# http://github.com/petervanderdoes/gitflow +# http://github.com/CJ-Systems/gitflow-cjs # # Authors: # Copyright 2003 CJ Systems. All rights reserved. diff --git a/git-flow-bugfix b/git-flow-bugfix index 6c393b3..297324c 100644 --- a/git-flow-bugfix +++ b/git-flow-bugfix @@ -8,7 +8,7 @@ # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: -# http://github.com/petervanderdoes/gitflow +# http://github.com/CJ-Systems/gitflow-cjs # # Authors: # Copyright 2003 CJ Systems. All rights reserved. diff --git a/git-flow-config b/git-flow-config index 9c636e3..70843c9 100644 --- a/git-flow-config +++ b/git-flow-config @@ -8,7 +8,7 @@ # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: -# http://github.com/petervanderdoes/gitflow +# http://github.com/CJ-Systems/gitflow-cjs # # Authors: # Copyright 2003 CJ Systems. All rights reserved. diff --git a/git-flow-feature b/git-flow-feature index ef248ca..6bea18b 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -8,7 +8,7 @@ # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: -# http://github.com/petervanderdoes/gitflow +# http://github.com/CJ-Systems/gitflow-cjs # # Authors: # Copyright 2003 CJ Systems. All rights reserved. diff --git a/git-flow-hotfix b/git-flow-hotfix index 0622f48..d182204 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -8,7 +8,7 @@ # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: -# http://github.com/petervanderdoes/gitflow +# http://github.com/CJ-Systems/gitflow-cjs # # Authors: # Copyright 2003 CJ Systems. All rights reserved. diff --git a/git-flow-init b/git-flow-init index b2f3a63..d151025 100644 --- a/git-flow-init +++ b/git-flow-init @@ -8,7 +8,7 @@ # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: -# http://github.com/petervanderdoes/gitflow +# http://github.com/CJ-Systems/gitflow-cjs # # Authors: # Copyright 2003 CJ Systems. All rights reserved. diff --git a/git-flow-log b/git-flow-log index f6833e2..2d6da42 100644 --- a/git-flow-log +++ b/git-flow-log @@ -8,7 +8,7 @@ # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: -# http://github.com/petervanderdoes/gitflow +# http://github.com/CJ-Systems/gitflow-cjs # # Authors: # Copyright 2003 CJ Systems. All rights reserved. diff --git a/git-flow-release b/git-flow-release index 17ba752..3caaf08 100644 --- a/git-flow-release +++ b/git-flow-release @@ -8,7 +8,7 @@ # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: -# http://github.com/petervanderdoes/gitflow +# http://github.com/CJ-Systems/gitflow-cjs # # Authors: # Copyright 2003 CJ Systems. All rights reserved. diff --git a/git-flow-support b/git-flow-support index c0bc4d2..f7bb3ec 100644 --- a/git-flow-support +++ b/git-flow-support @@ -8,7 +8,7 @@ # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: -# http://github.com/petervanderdoes/gitflow +# http://github.com/CJ-Systems/gitflow-cjs # # Authors: # Copyright 2003 CJ Systems. All rights reserved. diff --git a/git-flow-version b/git-flow-version index cb25214..e38dde3 100644 --- a/git-flow-version +++ b/git-flow-version @@ -8,7 +8,7 @@ # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: -# http://github.com/petervanderdoes/gitflow +# http://github.com/CJ-Systems/gitflow-cjs # # Authors: # Copyright 2003 CJ Systems. All rights reserved. diff --git a/gitflow-common b/gitflow-common index 4ff34fd..175637b 100644 --- a/gitflow-common +++ b/gitflow-common @@ -8,7 +8,7 @@ # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: -# http://github.com/petervanderdoes/gitflow +# http://github.com/CJ-Systems/gitflow-cjs # # Authors: # Copyright 2003 CJ Systems. All rights reserved. From 89095b2555597f1d0492b9af611e024fb4dc172f Mon Sep 17 00:00:00 2001 From: Chris Stone Date: Tue, 4 Jul 2023 08:30:23 -0600 Subject: [PATCH 06/20] Revert "Support Git Environment Credentials" --- git-flow-init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-flow-init b/git-flow-init index 3ec365a..f66031a 100644 --- a/git-flow-init +++ b/git-flow-init @@ -116,8 +116,8 @@ file= use given config file fi if git_config_bool_exists "user.useconfigonly"; then - user_email=$(git config --get user.email || echo $GIT_AUTHOR_EMAIL) - user_name=$(git config --get user.name || echo $GIT_AUTHOR_NAME) + user_email=$(git config --get user.email) + user_name=$(git config --get user.name) if [ -z "${user_email}" ] || [ -z "${user_name}" ]; then die "Configuration useconfigonly is set but no name and/or email was set" fi From 18b05aa9a6f9b730a968295a4578afd24926ec02 Mon Sep 17 00:00:00 2001 From: ChrisjStone Date: Tue, 4 Jul 2023 09:15:25 -0600 Subject: [PATCH 07/20] feat(init): add sign flag to create signed commit The -g, --sign flag will create a gpg-signed commit when creating the production branch in a new git repository. This will allow for the option to use the Require Signed Commits branch protection rule on GitHub. closes CJ-Systems/gitflow-cjs#59 --- git-flow-init | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/git-flow-init b/git-flow-init index d151025..b150c75 100644 --- a/git-flow-init +++ b/git-flow-init @@ -67,6 +67,7 @@ h,help! Show this help showcommands! Show git commands while executing them d,[no]defaults Use default branch naming conventions f,[no]force Force setting of gitflow branches, even if already configured +g,[no]sign Sign initial commit when creating a repository p,feature! Feature branches b,bugfix! Bugfix branches @@ -90,6 +91,7 @@ file= use given config file DEFINE_boolean 'local' false 'use repository config file' DEFINE_boolean 'global' false 'use global config file' DEFINE_boolean 'system' false 'use system config file' + DEFINE_boolean 'sign' false 'sign initial commit when creating a repository' g DEFINE_string 'file' "" 'use given config file' DEFINE_string 'feature' "" 'feature branches' p DEFINE_string 'bugfix' "" 'bugfix branches' b @@ -260,8 +262,13 @@ file= use given config file local created_gitflow_branch=0 if ! git rev-parse --quiet --verify HEAD >/dev/null 2>&1; then git_do symbolic-ref HEAD "refs/heads/$master_branch" - git_do commit --allow-empty --quiet -m "Initial commit" - created_gitflow_branch=1 + if flag sign; then + git_do commit --allow-empty --gpg-sign --quiet -m "initial commit" + created_gitflow_branch=1 + else + git_do commit --allow-empty --quiet -m "initial commit" + created_gitflow_branch=1 + fi fi # Creation of master From 8e703e0be542431f28c95b65c3cdb0bc0b49c469 Mon Sep 17 00:00:00 2001 From: ab Date: Fri, 16 May 2014 21:44:33 +0200 Subject: [PATCH 08/20] a quick option to create release from existing feature branch --- git-flow-feature | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/git-flow-feature b/git-flow-feature index 6bea18b..994d1d2 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -430,6 +430,32 @@ no-ff! Never fast-forward during the merge helper_finish_cleanup } +cmd_release() { + # 1) pull dev from origin + # git_do checkout "$BRANCH" + # git_do (or somth exists alredy here?) + + # Parse arguments + parse_args "$@" + + # Use current branch if no name is given + if [ "$NAME" = "" ]; then + gitflow_use_current_branch_name + fi + + # 2) merge feature to dev + cmd_finish "--fetch" "--squash" "--keep" $NAME + + # 3) sync back dev to feature + echo "Merging $BASE_BRANCH to $BRANCH" + git_do checkout "$BRANCH" || die "Could not check out branch '$BRANCH'." + git_do merge "$BASE_BRANCH" + + # 4) create release + git_do flow release start $NAME + +} + helper_finish_cleanup() { local keepmsg remotebranchdeleted localbranchdeleted From cfb08d7265ebd79c23a20e54ba4137933c724c6e Mon Sep 17 00:00:00 2001 From: ChrisjStone Date: Tue, 4 Jul 2023 21:19:23 -0600 Subject: [PATCH 09/20] feat(feature): add help for release command --- git-flow-feature | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/git-flow-feature b/git-flow-feature index 994d1d2..ef39746 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -59,6 +59,7 @@ git flow feature checkout git flow feature pull git flow feature delete git flow feature rename +git flow feature release Manage your feature branches. @@ -431,6 +432,14 @@ no-ff! Never fast-forward during the merge } cmd_release() { + OPTIONS_SPEC="\ +git flow feature release [-h] + +Create a release based on current feature +-- +h,help! Show this help +" + # 1) pull dev from origin # git_do checkout "$BRANCH" # git_do (or somth exists alredy here?) From d73ef0a47bfaac34f464d4cf9b69a216f36a8f5d Mon Sep 17 00:00:00 2001 From: ChrisjStone Date: Tue, 4 Jul 2023 20:56:41 -0600 Subject: [PATCH 10/20] feat(feature): add release sub command Add sub command to git flow feature that allows for a release to be created based off the current feature branch. When running feature release the feature branch is rebased with develop prior to the creation of the release branch. When finishing the release the resulting tag is back merged to the feature branch and not onto the production or develop branches. resolves #63 --- git-flow-feature | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/git-flow-feature b/git-flow-feature index ef39746..c5c5eea 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -452,16 +452,12 @@ h,help! Show this help gitflow_use_current_branch_name fi - # 2) merge feature to dev - cmd_finish "--fetch" "--squash" "--keep" $NAME + # 2) Update feature with dev + echo "Rebasing $BASE_BRANCH to $BRANCH" + git_do flow feature rebase || die "Could not rebase $BRANCH which is based on $BASE_BRANCH" - # 3) sync back dev to feature - echo "Merging $BASE_BRANCH to $BRANCH" - git_do checkout "$BRANCH" || die "Could not check out branch '$BRANCH'." - git_do merge "$BASE_BRANCH" - - # 4) create release - git_do flow release start $NAME + # 3) create release + git_do flow release start $NAME $BRANCH } From 1589eaa54a0bccb9d1cd2e48fd79109b6848bac7 Mon Sep 17 00:00:00 2001 From: ChrisjStone Date: Tue, 4 Jul 2023 21:37:57 -0600 Subject: [PATCH 11/20] chore(version): update snapshot version --- git-flow-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-flow-version b/git-flow-version index e38dde3..af8c6f9 100644 --- a/git-flow-version +++ b/git-flow-version @@ -39,7 +39,7 @@ # -GITFLOW_VERSION=2.1.0 +GITFLOW_VERSION=2.2.0-SNAPSHOT-2 initialize() { # A function can not be empty. Comments count as empty. From 413277deba1b84a83dbc3c7434b886479add4fcb Mon Sep 17 00:00:00 2001 From: ChrisjStone Date: Tue, 4 Jul 2023 21:38:50 -0600 Subject: [PATCH 12/20] docs(changelog): add current changes --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffc0dda..05cfbf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +#### 2.2.0-SNAPSHOT +* feat(feature): add release sub command. Thank You [codesurf42](https://github.com/codesurf42) for the initial pr +* feat(init): add sign flag to create initial signed commit +* feat(init): add support for "Support Git Environment Credentials" pull request #19 from filipekiss/feature/environment_credentials +* docs: update repository url in source files +* docs: update copyright information in source files +* fix: wording for help text in git flow log pull request #15 from Shea690901/hotfix/git-flow-log_help-message +* refactor(git-flow): add support for busybox-readlink request #12 from KAction/readlink-busybox + + #### 2.1.0 * feat: add create command to release allowing for a single step release prodution * feat: add missing hook script filter-flow-release-finish-version From 4a2be4479db77877d3a2819b4c859073afae3f32 Mon Sep 17 00:00:00 2001 From: Adam Rodger Date: Tue, 6 Nov 2018 20:57:03 +0000 Subject: [PATCH 13/20] Prevent hotfixes being merged to develop with nobackmerge flag, fixes #390 The previous solution still caused a merge to develop, it just performed the merge slightly differently which was misleading. The new solution does not merge to develop at all as the flag description implies. --- git-flow-hotfix | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/git-flow-hotfix b/git-flow-hotfix index d182204..0a04514 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -552,35 +552,22 @@ T,tagname! Use given tag name fi fi - if [ "$BASE_BRANCH" = "$MASTER_BRANCH" ]; then - # By default we back-merge the $MASTER_BRANCH unless the user explicitly - # stated not to do a back-merge, in that case we use the $BRANCH. - if noflag nobackmerge; then - MERGE_BRANCH="$BASE_BRANCH" - else - MERGE_BRANCH="$BRANCH" - fi - - # Try to merge into develop. + if [ "$BASE_BRANCH" = "$MASTER_BRANCH" ] && noflag nobackmerge; then + # Try to merge into develop unless the user specified the nobackmerge option. # In case a previous attempt to finish this release branch has failed, # but the merge into develop was successful, we skip it now - if ! git_is_branch_merged_into "$MERGE_BRANCH" "$DEVELOP_BRANCH"; then - git_do checkout "$DEVELOP_BRANCH" || die "Could not check out branch '$DEVELOP_BRANCH'." - - if noflag nobackmerge; then - # Accounting for 'git describe', if a release is tagged - # we use the tag commit instead of the branch. - if noflag notag; then - commit="$VERSION_PREFIX$TAGNAME" - else - commit="$BASE_BRANCH" - fi + if ! git_is_branch_merged_into "$BASE_BRANCH" "$DEVELOP_BRANCH"; then + # Accounting for 'git describe', if a release is tagged + # we use the tag commit instead of the branch. + if noflag notag; then + commit="$VERSION_PREFIX$TAGNAME" else - commit="$BRANCH" + commit="$BASE_BRANCH" fi - git_do merge --no-ff "$commit" || die "There were merge conflicts." - # TODO: What do we do now? + # merge master to develop + git_do checkout "$DEVELOP_BRANCH" || die "Could not check out branch '$DEVELOP_BRANCH'." + git_do merge --no-ff "$commit" || die "There were merge conflicts." # TODO: What do we do now? fi fi From 1d729c6e41975003dd00908d6512efa3923dcb22 Mon Sep 17 00:00:00 2001 From: ChrisjStone Date: Wed, 5 Jul 2023 08:01:13 -0600 Subject: [PATCH 14/20] docs(changelog): update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05cfbf5..32822a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog #### 2.2.0-SNAPSHOT +* fix: Prevent hotfixes being merged to develop with nobackmerge flag. Thank You [adamrodger](https://github.com/adamrodger) * feat(feature): add release sub command. Thank You [codesurf42](https://github.com/codesurf42) for the initial pr * feat(init): add sign flag to create initial signed commit * feat(init): add support for "Support Git Environment Credentials" pull request #19 from filipekiss/feature/environment_credentials From 070b92c0cb7a5799e79dff5cb347ef3ce567ae6a Mon Sep 17 00:00:00 2001 From: Adam Rodger Date: Tue, 6 Nov 2018 20:57:03 +0000 Subject: [PATCH 15/20] Prevent hotfixes being merged to develop with nobackmerge flag, fixes #390 The previous solution still caused a merge to develop, it just performed the merge slightly differently which was misleading. The new solution does not merge to develop at all as the flag description implies. --- git-flow-hotfix | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/git-flow-hotfix b/git-flow-hotfix index d182204..0a04514 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -552,35 +552,22 @@ T,tagname! Use given tag name fi fi - if [ "$BASE_BRANCH" = "$MASTER_BRANCH" ]; then - # By default we back-merge the $MASTER_BRANCH unless the user explicitly - # stated not to do a back-merge, in that case we use the $BRANCH. - if noflag nobackmerge; then - MERGE_BRANCH="$BASE_BRANCH" - else - MERGE_BRANCH="$BRANCH" - fi - - # Try to merge into develop. + if [ "$BASE_BRANCH" = "$MASTER_BRANCH" ] && noflag nobackmerge; then + # Try to merge into develop unless the user specified the nobackmerge option. # In case a previous attempt to finish this release branch has failed, # but the merge into develop was successful, we skip it now - if ! git_is_branch_merged_into "$MERGE_BRANCH" "$DEVELOP_BRANCH"; then - git_do checkout "$DEVELOP_BRANCH" || die "Could not check out branch '$DEVELOP_BRANCH'." - - if noflag nobackmerge; then - # Accounting for 'git describe', if a release is tagged - # we use the tag commit instead of the branch. - if noflag notag; then - commit="$VERSION_PREFIX$TAGNAME" - else - commit="$BASE_BRANCH" - fi + if ! git_is_branch_merged_into "$BASE_BRANCH" "$DEVELOP_BRANCH"; then + # Accounting for 'git describe', if a release is tagged + # we use the tag commit instead of the branch. + if noflag notag; then + commit="$VERSION_PREFIX$TAGNAME" else - commit="$BRANCH" + commit="$BASE_BRANCH" fi - git_do merge --no-ff "$commit" || die "There were merge conflicts." - # TODO: What do we do now? + # merge master to develop + git_do checkout "$DEVELOP_BRANCH" || die "Could not check out branch '$DEVELOP_BRANCH'." + git_do merge --no-ff "$commit" || die "There were merge conflicts." # TODO: What do we do now? fi fi From 76fb09a0ac5bc47d7bf912015cdd229dacd210f6 Mon Sep 17 00:00:00 2001 From: "Bankers, R.H.M. (Rob)" Date: Tue, 6 Aug 2019 11:03:59 +0200 Subject: [PATCH 16/20] feat(hotfix): add backmerge release Add new option releaseBackMerge to git flow hotfix finish when there is an existing release on a remote repository we can now backmerge the hotfix onto the release branch as well as develop and master. Origional author of PR: Bankers, R.H.M. (Rob) closes nvie/gitflow#177 and closes petervanderdoes/gitflow-avh#161 --- CHANGELOG.md | 4 +-- git-flow-hotfix | 69 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 56 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05cfbf5..171b230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog #### 2.2.0-SNAPSHOT +* feat: add option to hotfix finish to allow for backmerge to release branch. Thank You [Bankers88](https://github.com/Bankers88) +* fix: Prevent hotfixes being merged to develop with nobackmerge flag. Thank You [adamrodger](https://github.com/adamrodger) * feat(feature): add release sub command. Thank You [codesurf42](https://github.com/codesurf42) for the initial pr * feat(init): add sign flag to create initial signed commit * feat(init): add support for "Support Git Environment Credentials" pull request #19 from filipekiss/feature/environment_credentials @@ -9,7 +11,6 @@ * fix: wording for help text in git flow log pull request #15 from Shea690901/hotfix/git-flow-log_help-message * refactor(git-flow): add support for busybox-readlink request #12 from KAction/readlink-busybox - #### 2.1.0 * feat: add create command to release allowing for a single step release prodution * feat: add missing hook script filter-flow-release-finish-version @@ -17,7 +18,6 @@ * docs: update readme with better description as to why this fork was created. Thank You [shaedrick](https://github.com/shaedrich) **NOTE:** The format for a multi-line tag message is now "$(printf 'line of text with \n escape codes placed as needed for proper formating of the message')" - #### 2.0.1 * fix incorrect version identification along with updating source repository in gitflow-installer. Corrections pointed out by [bobstuart](https://github.com/bobstuart) diff --git a/git-flow-hotfix b/git-flow-hotfix index 0a04514..388521c 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -383,6 +383,7 @@ k,[no]keep Keep branch after performing finish D,[no]force_delete Force delete hotfix branch after finish n,[no]notag Don't tag this hotfix b,[no]nobackmerge Don't back-merge master, or tag if applicable, in develop +r,releaseBackmerge Back-merge to release branch if exists S,[no]squash Squash hotfix during merge T,tagname! Use given tag name " @@ -401,25 +402,27 @@ T,tagname! Use given tag name DEFINE_boolean 'force_delete' false "force delete hotfix branch after finish" D DEFINE_boolean 'notag' false "don't tag this hotfix" n DEFINE_boolean 'nobackmerge' false "don't back-merge $MASTER_BRANCH, or tag if applicable, in $DEVELOP_BRANCH " b + DEFINE_boolean 'releasebackmerge' false "back-merge to release branch if exists" r DEFINE_boolean 'squash' false "squash release during merge" S DEFINE_boolean 'squash-info' false "add branch info during squash" DEFINE_string 'tagname' "" "use the given tag name" T # Override defaults with values from config - gitflow_override_flag_boolean "hotfix.finish.fetch" "fetch" - gitflow_override_flag_boolean "hotfix.finish.sign" "sign" - gitflow_override_flag_boolean "hotfix.finish.push" "push" - gitflow_override_flag_boolean "hotfix.finish.keep" "keep" - gitflow_override_flag_boolean "hotfix.finish.keepremote" "keepremote" - gitflow_override_flag_boolean "hotfix.finish.keeplocal" "keeplocal" - gitflow_override_flag_boolean "hotfix.finish.force-delete" "force_delete" - gitflow_override_flag_boolean "hotfix.finish.notag" "notag" - gitflow_override_flag_boolean "hotfix.finish.nobackmerge" "nobackmerge" - gitflow_override_flag_boolean "hotfix.finish.squash" "squash" - gitflow_override_flag_boolean "hotfix.finish.squash-info" "squash_info" - gitflow_override_flag_string "hotfix.finish.signingkey" "signingkey" - gitflow_override_flag_string "hotfix.finish.message" "message" - gitflow_override_flag_string "hotfix.finish.messagefile" "messagefile" + gitflow_override_flag_boolean "hotfix.finish.fetch" "fetch" + gitflow_override_flag_boolean "hotfix.finish.sign" "sign" + gitflow_override_flag_boolean "hotfix.finish.push" "push" + gitflow_override_flag_boolean "hotfix.finish.keep" "keep" + gitflow_override_flag_boolean "hotfix.finish.keepremote" "keepremote" + gitflow_override_flag_boolean "hotfix.finish.keeplocal" "keeplocal" + gitflow_override_flag_boolean "hotfix.finish.force-delete" "force_delete" + gitflow_override_flag_boolean "hotfix.finish.notag" "notag" + gitflow_override_flag_boolean "hotfix.finish.nobackmerge" "nobackmerge" + gitflow_override_flag_boolean "hotfix.finish.releasebackmerge" "releasebackmerge" + gitflow_override_flag_boolean "hotfix.finish.squash" "squash" + gitflow_override_flag_boolean "hotfix.finish.squash-info" "squash_info" + gitflow_override_flag_string "hotfix.finish.signingkey" "signingkey" + gitflow_override_flag_string "hotfix.finish.message" "message" + gitflow_override_flag_string "hotfix.finish.messagefile" "messagefile" # Parse arguments parse_args "$@" @@ -564,19 +567,54 @@ T,tagname! Use given tag name else commit="$BASE_BRANCH" fi - # merge master to develop git_do checkout "$DEVELOP_BRANCH" || die "Could not check out branch '$DEVELOP_BRANCH'." git_do merge --no-ff "$commit" || die "There were merge conflicts." # TODO: What do we do now? fi fi + if flag releasebackmerge; then + _releasePrefix=$(git config --get gitflow.prefix.release) + release_branches=$(git_local_branches_prefixed "$_releasePrefix") + release_branch= + # Check if there is a release branch + if [ -n "$release_branches" ]; then + # Get the release branch name + release_branch=$(echo ${release_branches} | head -n1) + # Check if release branch exists on remote + if git_remote_branch_exists "$ORIGIN/$release_branch"; then + # Try to merge into release. + # In case a previous attempt to finish this release branch has failed, + # but the merge into release was successful, we skip it now + if ! git_is_branch_merged_into "$MERGE_BRANCH" "$release_branch"; then + git_do checkout "$release_branch" || die "Could not check out branch '$release_branch'." + # Accounting for 'git describe', if a release is tagged + # we use the tag commit instead of the branch. + if noflag notag; then + commit="$VERSION_PREFIX$TAGNAME" + else + commit="$BASE_BRANCH" + fi + else + commit="$BRANCH" + fi + git_do merge --no-ff "$commit" || die "There were merge conflicts." + # TODO: What do we do now? + else + echo "Remote release $release_branch not found" + fi + fi + fi + run_post_hook "$VERSION_PREFIX$TAGNAME" "$ORIGIN" "$BRANCH" if flag push; then if [ "$BASE_BRANCH" = "$MASTER_BRANCH" ]; then git_do push "$ORIGIN" "$DEVELOP_BRANCH" || die "Could not push branch '$DEVELOP_BRANCH' to remote '$ORIGIN'." fi + if [ -n "$release_branch" ]; then + git_do push "$ORIGIN" "$release_branch" || dir "Could not push branch '$release_branch' to remote '$ORIGIN'." + fi git_do push "$ORIGIN" "$BASE_BRANCH" || die "Could not push branch '$BASE_BRANCH' to remote '$ORIGIN'." if noflag notag; then git_do push --tags "$ORIGIN" || die "Could not push tags to remote '$ORIGIN'." @@ -623,6 +661,7 @@ T,tagname! Use given tag name fi if [ "$BASE_BRANCH" = "$MASTER_BRANCH" ]; then [ "$commit" = "$BASE_BRANCH" ] && echo "- Master branch '$BASE_BRANCH' has been back-merged into '$DEVELOP_BRANCH'" + [ -n "$release_branch" ] && echo "- Hotfix tag '$VERSION_PREFIX$TAGNAME' has been back-merged into '$release_branch'" [ "$commit" = "$VERSION_PREFIX$TAGNAME" ] && echo "- Hotfix tag '$VERSION_PREFIX$TAGNAME' has been back-merged into '$DEVELOP_BRANCH'" [ "$commit" = "$BRANCH" ] && echo "- Hotfix branch '$BRANCH' has been merged into '$DEVELOP_BRANCH'" fi From 25c387c62801d29e34b087efcf2709b666e21bc6 Mon Sep 17 00:00:00 2001 From: Chris Stone Date: Wed, 5 Jul 2023 20:53:47 -0600 Subject: [PATCH 17/20] fix: branch existence checks Co-authored-by: blooper05 --- git-flow-hotfix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/git-flow-hotfix b/git-flow-hotfix index 388521c..b037d68 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -349,17 +349,18 @@ showcommands! Show git commands while executing them # Sanity checks require_clean_working_tree - require_branch_absent "$BRANCH" - git_do fetch -q "$ORIGIN" - require_branch "$ORIGIN/$BRANCH" + require_local_branch_absent "$BRANCH" + + git_do fetch -q "$ORIGIN" || die "Could not fetch branch '$BRANCH' from remote '$ORIGIN'." + git_remote_branch_exists "$ORIGIN/$BRANCH" # Create tracking branch - git_do checkout -b "$BRANCH" "$ORIGIN/$BRANCH" + git_do checkout -b "$BRANCH" "$ORIGIN/$BRANCH" || die "Could not create branch '$BRANCH'." echo echo "Summary of actions:" echo "- A new remote tracking branch '$BRANCH' was created" - echo "- You are now on branch '$BRANCH'" + echo "- You are now on branch '$(git_current_branch)'" echo } From ca6828e993417b7b68d3540d70dd97d2f482564e Mon Sep 17 00:00:00 2001 From: Chris Stone Date: Wed, 5 Jul 2023 23:18:51 -0600 Subject: [PATCH 18/20] feat: add cherrypick option to hotfix finish (#73) Allows for the commits that resolve the hotfix to be applied to the develop branch instead of the entire hotfix branch. This option is not compatible with the nobackmerge or releaseBackmerge flags. The initial pull request provided by [simonweil](https://github.com/simonweil) closes #67 closes #37 closes petervanderdoes#164 closes petervanderdoes#165 Co-authored-by: simonweil --- git-flow-hotfix | 59 +++++++++++++++++++++++++++++++++++++++++++++---- gitflow-common | 19 ++++++++++++++++ 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/git-flow-hotfix b/git-flow-hotfix index b037d68..17c88cf 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -366,7 +366,7 @@ showcommands! Show git commands while executing them cmd_finish() { OPTIONS_SPEC="\ -git flow hotfix finish [-h] [-F] [-s] [-u] [-m | -f ] [-p] [-k] [-n] [-b] [-S] +git flow hotfix finish [-h] [-F] [-s] [-u] [-m | -f ] [-p] [-k] [-n] [-b | -c] [-S] Finish hotfix branch -- @@ -387,6 +387,7 @@ b,[no]nobackmerge Don't back-merge master, or tag if applicable, in develop r,releaseBackmerge Back-merge to release branch if exists S,[no]squash Squash hotfix during merge T,tagname! Use given tag name +c,cherrypick Cherry Pick to $DEVELOP_BRANCH instead of merge " local opts commit keepmsg remotebranchdeleted localbranchdeleted @@ -407,6 +408,7 @@ T,tagname! Use given tag name DEFINE_boolean 'squash' false "squash release during merge" S DEFINE_boolean 'squash-info' false "add branch info during squash" DEFINE_string 'tagname' "" "use the given tag name" T + DEFINE_boolean 'cherrypick' false "Cherry Pick to $DEVELOP_BRANCH instead of merge" c # Override defaults with values from config gitflow_override_flag_boolean "hotfix.finish.fetch" "fetch" @@ -424,6 +426,7 @@ T,tagname! Use given tag name gitflow_override_flag_string "hotfix.finish.signingkey" "signingkey" gitflow_override_flag_string "hotfix.finish.message" "message" gitflow_override_flag_string "hotfix.finish.messagefile" "messagefile" + gitflow_override_flag_boolean "hotfix.finish.cherrypick" "cherrypick" # Parse arguments parse_args "$@" @@ -453,6 +456,15 @@ T,tagname! Use given tag name FLAGS_keep=$FLAGS_TRUE fi + # Check that not both no merge flags were given + if flag cherrypick && flag nobackmerge; then + die "You can't use 'cherrypick' and 'nobackmerge' together." + fi + + if flag cherrypick && flag releasebackmerge; then + die "You can't use 'cherrypick' and 'releasebackmerge' together." + fi + # Sanity checks require_branch "$BRANCH" require_clean_working_tree @@ -521,6 +533,42 @@ T,tagname! Use given tag name run_pre_hook "$VERSION_PREFIX$TAGNAME" "$ORIGIN" "$BRANCH" +if flag cherrypick; then +printf 'this is the cherrypick\n' +read + git_do checkout "$DEVELOP_BRANCH" || die "Could not check out branch '$DEVELOP_BRANCH'." + + local old_IFS=$IFS # save the field separator + IFS=$'\n' # new field separator, the end of line + for git_line in $(git log --format="%H %s" --reverse $MASTER_BRANCH..$BRANCH | grep -vE "^[a-z0-9]* Merge branch '[^'].*?'$"); do + local commit_hash=$(echo $git_line | cut -d" " -f1) + if [[ $(git log $DEVELOP_BRANCH --grep "$commit_hash" | wc -l) -eq 0 ]]; then + echo "\n${LIGHTGREEN}Cherry picking: $git_line${NOCOLOR}" + git_do cherry-pick -x -s $commit_hash + if [[ $? -ne 0 ]]; then + echo " +=============================================================== += Cherry pick has conflicts, steps to continue: += 1. Fix the conflicts += 2. Stage the fixed file: '${BLUE}git add ${NOCOLOR}' += 3. Continue the cherry pick: '${BLUE}git cherry-pick --continue${NOCOLOR}' += *** If fixing the conflict results in an empty commit, += you will need to run this command: '${BLUE}git commit --allow-empty${NOCOLOR}' += 4. Switch back to the hotfix branch: '${BLUE}git checkout $BRANCH${NOCOLOR}' += 5. Rerun the finish command: '${BLUE}git flow hotfix finish${NOCOLOR}' += OR run '${BLUE}git cherry-pick --abort${NOCOLOR}' to abort the cherry pick +===============================================================\n" + die "Cherry pick failed for commit: $commit_hash" + fi + else + echo "\n${LIGHTGREEN}Commit has already been Cherry Picked: $git_line${NOCOLOR}" + fi + done + IFS=$old_IFS # restore default field separator + + git_do checkout $BRANCH || die "Could not check out branch '$BRANCH'." + fi + # Try to merge into BASE. # In case a previous attempt to finish this release branch has failed, # but the merge into BASE was successful, we skip it now @@ -556,7 +604,7 @@ T,tagname! Use given tag name fi fi - if [ "$BASE_BRANCH" = "$MASTER_BRANCH" ] && noflag nobackmerge; then + if [ "$BASE_BRANCH" = "$MASTER_BRANCH" ] && noflag nobackmerge && noflag cherrypick; then # Try to merge into develop unless the user specified the nobackmerge option. # In case a previous attempt to finish this release branch has failed, # but the merge into develop was successful, we skip it now @@ -660,12 +708,15 @@ T,tagname! Use given tag name if noflag notag; then echo "- The hotfix was tagged '$VERSION_PREFIX$TAGNAME'" fi - if [ "$BASE_BRANCH" = "$MASTER_BRANCH" ]; then + if flag cherrypick; then + echo "- All commits from the hotfix branch have been cherry picked into '$DEVELOP_BRANCH'" + elif [ "$BASE_BRANCH" = "$MASTER_BRANCH" ]; then [ "$commit" = "$BASE_BRANCH" ] && echo "- Master branch '$BASE_BRANCH' has been back-merged into '$DEVELOP_BRANCH'" [ -n "$release_branch" ] && echo "- Hotfix tag '$VERSION_PREFIX$TAGNAME' has been back-merged into '$release_branch'" - [ "$commit" = "$VERSION_PREFIX$TAGNAME" ] && echo "- Hotfix tag '$VERSION_PREFIX$TAGNAME' has been back-merged into '$DEVELOP_BRANCH'" + [ "$commit" = "$VERSION_PREFIX$VERSION" ] && echo "- Hotfix tag '$VERSION_PREFIX$VERSION' has been back-merged into '$DEVELOP_BRANCH'" [ "$commit" = "$BRANCH" ] && echo "- Hotfix branch '$BRANCH' has been merged into '$DEVELOP_BRANCH'" fi + if noflag keep; then if [ $localbranchdeleted -eq $FLAGS_TRUE ]; then keepmsg="has been locally deleted" diff --git a/gitflow-common b/gitflow-common index 175637b..dcd78e3 100644 --- a/gitflow-common +++ b/gitflow-common @@ -811,3 +811,22 @@ run_post_hook() { flags_help() { eval "$( echo "$OPTIONS_SPEC" | git rev-parse --parseopt -- "-h" || echo exit $? )" } + +# +# Color constants +# +echo_color_support() { + local echo_path=$(which echo) + local echo_out=$($echo_path -e) + if [[ $echo_out == "" ]]; then + alias echo="$echo_path -e " + BLUE="\e[34m" + LIGHTGREEN="\e[92m" + NOCOLOR="\e[0m" + else + BLUE="" + LIGHTGREEN="" + NOCOLOR="" + fi +} +echo_color_support \ No newline at end of file From e337c8865c79ec5883b27681afdf63b7b5269ae5 Mon Sep 17 00:00:00 2001 From: ChrisjStone Date: Thu, 6 Jul 2023 01:33:26 -0600 Subject: [PATCH 19/20] docs(changelog): add release notes * feat(git-flow): add support for busybox(#12) * feat(init): add support for environment credentials (#19) Allows git flow to fall back to the same environment variables git uses for setting the author and committer details if they are not present in the users .gitconfig * feat(init): add option to sign initial commit (#59) When running git flow init the following option is now available when creating a git repository using git flow.. 1) -g, --[no]sign Sign initial commit when creating a repository When setting up git flow in a freshly created git repository with no prior commits or when using git flow to create a git repository in an existing folder the sign flag will create a signed empty commit with the message initial commit. * feat(feature): add feature release command (#64) Added git flow feature release to provide a quick way to create a release branch from a existing feature branch. * fix(hotfix): git flow hotfix track fails due to branch name check (#68) * feat(hotfix): add cherrypick option to hotfix finish (#73) * feat(hotfix): add backmerge option to release branch (#71) * fix(hotfix): git flow hotfix finish -b back-merges to develop (#66) When runing hotfix finish the following options have been the following options have been added: 1) -r, --releaseBackmerge Back-merge to release branch if exists 2) -c, --cherrypick Cherry Pick to develop instead of merge 3) -b, --[no]nobackmerge Don't merge master, or tag onto develop NOTE: One one of the above three options can be used at any given time since it doesn't make sence to combine them. * fix(log): fix git flow log help message (#15) git flow log help no longer implies it can only be used with feature branches --- CHANGELOG.md | 20 ++++++++++---------- git-flow-hotfix | 6 +++++- git-flow-init | 4 ++-- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 171b230..8822ddc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,15 @@ # Changelog -#### 2.2.0-SNAPSHOT -* feat: add option to hotfix finish to allow for backmerge to release branch. Thank You [Bankers88](https://github.com/Bankers88) -* fix: Prevent hotfixes being merged to develop with nobackmerge flag. Thank You [adamrodger](https://github.com/adamrodger) -* feat(feature): add release sub command. Thank You [codesurf42](https://github.com/codesurf42) for the initial pr -* feat(init): add sign flag to create initial signed commit -* feat(init): add support for "Support Git Environment Credentials" pull request #19 from filipekiss/feature/environment_credentials -* docs: update repository url in source files -* docs: update copyright information in source files -* fix: wording for help text in git flow log pull request #15 from Shea690901/hotfix/git-flow-log_help-message -* refactor(git-flow): add support for busybox-readlink request #12 from KAction/readlink-busybox +#### 2.2.0 +* feat(init): add option to sign initial commit (#59) +* feat(git-flow): add support for environment credentials (#19) +* feat(git-flow): add support for busybox(#12) +* feat(feature): add feature release command (#64) +* feat(hotfix): add cherrypick option to hotfix finish (#73) +* feat(hotfix): add backmerge option to release branch (#71) +* fix(hotfix): git flow hotfix finish -b still back-merges to develop (#66) +* fix(hotfix): git flow hotfix track fails due to branch name check (#68) +* fix: git flow log help message (#15) #### 2.1.0 * feat: add create command to release allowing for a single step release prodution diff --git a/git-flow-hotfix b/git-flow-hotfix index 17c88cf..f1e9853 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -366,7 +366,7 @@ showcommands! Show git commands while executing them cmd_finish() { OPTIONS_SPEC="\ -git flow hotfix finish [-h] [-F] [-s] [-u] [-m | -f ] [-p] [-k] [-n] [-b | -c] [-S] +git flow hotfix finish [-h] [-F] [-s] [-u] [-m | -f ] [-p] [-k] [-n] [-b | -c | -r] [-S] Finish hotfix branch -- @@ -465,6 +465,10 @@ c,cherrypick Cherry Pick to $DEVELOP_BRANCH instead of merge die "You can't use 'cherrypick' and 'releasebackmerge' together." fi + if flag nobackmerge && flag releasebackmerge; then + die "You can't use 'nobackmerge' && 'releasebackmerge' together." + fi + # Sanity checks require_branch "$BRANCH" require_clean_working_tree diff --git a/git-flow-init b/git-flow-init index b150c75..0ab7b19 100644 --- a/git-flow-init +++ b/git-flow-init @@ -59,7 +59,7 @@ parse_args() { # Default entry when no SUBACTION is given cmd_default() { OPTIONS_SPEC="\ -git flow init [-h] [-d] [-f] +git flow init [-h] [-d] [-f] [-g] Setup a git repository for git flow usage. Can also be used to start a git repository. -- @@ -396,7 +396,7 @@ file= use given config file [ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion} git_do config $gitflow_config_option gitflow.prefix.support "$prefix" fi - + # Version tag prefix if ! git config --get gitflow.prefix.versiontag >/dev/null 2>&1 || flag force; then if [ "$FLAGS_tag" != "" ]; then From 2eed4b590379b7e957b5d91d9b20643cd0b91a4b Mon Sep 17 00:00:00 2001 From: ChrisjStone Date: Thu, 6 Jul 2023 02:07:01 -0600 Subject: [PATCH 20/20] chore(release): release version 2.2.0 --- git-flow-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-flow-version b/git-flow-version index af8c6f9..64a480f 100644 --- a/git-flow-version +++ b/git-flow-version @@ -39,7 +39,7 @@ # -GITFLOW_VERSION=2.2.0-SNAPSHOT-2 +GITFLOW_VERSION=2.2.0 initialize() { # A function can not be empty. Comments count as empty.