Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: git flow hotfix track fails due to branch name check #68

Closed
ChrisJStone opened this issue Jul 5, 2023 · 4 comments · Fixed by #28
Closed

fix: git flow hotfix track fails due to branch name check #68

ChrisJStone opened this issue Jul 5, 2023 · 4 comments · Fixed by #28
Assignees
Labels
Milestone

Comments

@ChrisJStone
Copy link
Member

Given the following repository setup:

  • Repository is initialized with git flow
  • A hotfix branch exists on origin (say, hotfix/1.2.3)
  • No local hotfix branch exists.

The following command fails:
git flow hotfix track 1.2.3

with:
Fatal: Branch 'hotfix/1.2.3' already exists. Pick another name.

Even though no such branch exists locally.

This is due to https://github.com/petervanderdoes/gitflow-avh/blob/develop/git-flow-hotfix#L343, where require_branch_absent requires both the local AND remote branch to be absent.

@ChrisJStone
Copy link
Member Author

Hello.
@petervanderdoes Is someone already working on a fix for this ?
This problem seems quite old.
I'd be willing to try and submit a PR.

@ChrisJStone
Copy link
Member Author

I just ran into this same bug today. 😠

@ChrisJStone
Copy link
Member Author

I’ll see if I have some time this week to fix it.

@ChrisJStone
Copy link
Member Author

I just ran into this same bug. Please accept PR from @blooper05

@ChrisJStone ChrisJStone self-assigned this Jul 5, 2023
@ChrisJStone ChrisJStone added the bug label Jul 5, 2023
@ChrisJStone ChrisJStone added this to the 2.2.0 milestone Jul 5, 2023
@ChrisJStone ChrisJStone moved this to 🏗 In progress in gitflow-cjs Jul 5, 2023
@ChrisJStone ChrisJStone changed the title 'git flow hotfix track' fails due to branch name check fit: git flow hotfix track fails due to branch name check Jul 5, 2023
@ChrisJStone ChrisJStone changed the title fit: git flow hotfix track fails due to branch name check fix: git flow hotfix track fails due to branch name check Jul 5, 2023
@ChrisJStone ChrisJStone linked a pull request Jul 5, 2023 that will close this issue
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in gitflow-cjs Jul 6, 2023
ChrisJStone added a commit that referenced this issue Jul 6, 2023
* 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
ChrisJStone added a commit that referenced this issue Jul 6, 2023
* 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

* chore(release): release version 2.2.0

---------

Signed-off-by: Shea690901 <ginny690901@hotmail.de>
Co-authored-by: Filipe Kiss <hello@filipekiss.com.br>
Co-authored-by: Shea690901 <ginny690901@hotmail.de>
Co-authored-by: Dmitry Bogatov <git#v1@kaction.cc>
Co-authored-by: ab <adamdd55@gmail.com>
Co-authored-by: Adam Rodger <adam.rodger@gmail.com>
Co-authored-by: Bankers, R.H.M. (Rob) <rob.bankers@sns.nl>
Co-authored-by: blooper05 <legend.of.blooper@gmail.com>
Co-authored-by: simonweil  <swdevelop1981@gmail.com>
ChrisJStone added a commit that referenced this issue Jul 6, 2023
* 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

* chore(release): release version 2.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant