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

Plus sign in the feature branch name #148

Open
boryn opened this issue Aug 24, 2011 · 6 comments
Open

Plus sign in the feature branch name #148

boryn opened this issue Aug 24, 2011 · 6 comments

Comments

@boryn
Copy link

boryn commented Aug 24, 2011

I had a feature branch named 'feature/google+' and unfortunately none of the git flow command could find it. I got all the time:
Branch 'feature/google+' does not exist and is required.

Problably some problem with grep or sth. Would be worthy to check also some other characters which are allowed in branch names but are not caught by git flow

Regards
Michal

@Zoramite
Copy link
Contributor

Git supports the + so it is specific to gitflow:

git branch 'google+'

@pyby
Copy link

pyby commented Feb 8, 2012

Same issue. The "+" character doesn't work with gitflow.
git flow release start 1.0+1.1b1 works
git flow release finish 1.0+1.1b1 says Branch 'release/1.0+1.1b1' does not exist and is required.
I have to rename the branch to release/1.0_1.1b1, finish the release, create an other tag with the good name 1.0+1.1b1 and delete the other tag. A bit dispointed ;)

Thanks for your work !

asnowfix pushed a commit to asnowfix/gitflow that referenced this issue Apr 23, 2014
See petervanderdoes/gitflow-avh#148 for a full description
of this issue.  In short, the export can fail (either raising an error from the
shell, or silently exporting an incorrect value) if the path to the repo
contains spaces.

It is solved by quoting the value to be exported, preventing the shell
from splitting the result into multiple values (and then trying to parse those
as multiple variable-names & values).

Fixes nvie#148
@mplacona
Copy link

Have the same problem here. This still doesn't seem to have been fixed. Using @pyby's workaround seems to work, but it's just a bit hacky.

Worth referring to this is if you wanna do it this way though:

@gsklee
Copy link

gsklee commented Apr 23, 2015

Just stepped on the trap as well... Hopefully we can have this fixed soon, plus sign is a valid way to add build info to version number per semver spec.

@shumkov
Copy link

shumkov commented Aug 17, 2015

👍

@daniel-garcia
Copy link

the following patch fixed things for me:

--- /usr/local/Cellar/git-flow/0.4.1/libexec/bin/gitflow-common.orig    2017-10-05 20:35:16.000000000 -0500
+++ /usr/local/Cellar/git-flow/0.4.1/libexec/bin/gitflow-common 2017-10-05 20:35:03.000000000 -0500
@@ -50,7 +50,15 @@ escape() {
 
 # set logic
 has() {
-       echo " $@ " | grep -q " $(escape $item) "
+       local item=$1; shift
+       for s in $@; do
+               if [ "$item" = "$s" ]; then
+                       return 0
+               fi
+       done
+       return 1
+        # the following code has issues with + in the branch names
+       #echo " $@ " | grep -q " $(escape $item) "
 }
 
 # basic math

daniel-garcia pushed a commit to daniel-garcia/gitflow that referenced this issue Oct 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants