gitflow icon indicating copy to clipboard operation
gitflow copied to clipboard

Plus sign in the feature branch name

Open boryn opened this issue 14 years ago • 6 comments

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

boryn avatar Aug 24 '11 09:08 boryn

Git supports the + so it is specific to gitflow:

git branch 'google+'

Zoramite avatar Oct 14 '11 03:10 Zoramite

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 !

pyby avatar Feb 08 '12 11:02 pyby

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:

mplacona avatar Jun 22 '14 09:06 mplacona

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.

gsklee avatar Apr 23 '15 09:04 gsklee

:+1:

shumkov avatar Aug 17 '15 09:08 shumkov

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 avatar Oct 06 '17 01:10 daniel-garcia