Gitflow: 加号登录功能分支名称

创建于 2011-08-24  ·  6评论  ·  资料来源: nvie/gitflow

我有一个名为“feature/google+”的功能分支,不幸的是,没有一个 git flow 命令可以找到它。 我一直都在:
_Branch 'feature/google+' 不存在,是必需的。_

可能是 grep 或 sth 的一些问题。 值得检查分支名称中允许但未被 git flow 捕获的其他一些字符

问候
迈克尔

所有6条评论

Git 支持 + 所以它特定于 gitflow:

git branch 'google+'

同样的问题。 “+”字符不适用于 gitflow。
git flow release start 1.0+1.1b1 有效
git flow release finish 1.0+1.1b1 说 Branch 'release/1.0+1.1b1' 不存在并且是必需的。
我必须将分支重命名为 release/1.0_1.1b1,完成发布,创建另一个名称为 1.0+1.1b1 的标签并删除另一个标签。 有点失望;)

谢谢你的工作!

这里有同样的问题。 这似乎仍然没有得到解决。 使用@pyby的解决方法似乎可行,但它有点 hacky。

值得一提是,如果您想这样做:

刚刚也踩到了陷阱……希望我们能尽快解决这个问题,加号是根据 semver 规范将构建信息添加到版本号的有效方法。

:+1:

以下补丁为我修复了一些问题:

--- /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
此页面是否有帮助?
0 / 5 - 0 等级

相关问题

andremedeiros picture andremedeiros  ·  34评论

OJ picture OJ  ·  29评论

alanhogan picture alanhogan  ·  6评论

devlins picture devlins  ·  21评论

piercemcgeough picture piercemcgeough  ·  8评论