如何在Gerrit推送主题中转义空白?

问题描述 投票:0回答:2
git push origin HEAD:refs/for/master%topic='test topic'

此操作失败,错误为fatal: remote part of refspec is not a valid name in HEAD:refs/for/master%topic=test topic

我尝试过%topic='\"test\ topic\"'%topic='test\ topic',但是没有用,问题是空格,它支持%topic='test_topic'

如何逃脱空白?

git gerrit git-push
2个回答
0
投票

Git中没有“主题”之类的东西。您只是使用一些约定将有关分支的元数据嵌入到其名称中。有关分支名称中允许使用哪些字符的信息,请参见man git-check-ref-format。最相关的是规则4:

  1. 它们不能具有ASCII控制字符(即其值小于\ 040或\ 177 DEL),空格,代字号〜,插入号^或冒号:任何地方。

0
投票

尝试

git push origin HEAD:refs/for/master -o topic='test topic'

请参见https://gerrit-documentation.storage.googleapis.com/Documentation/3.0.4/intro-user.html#topics

© www.soinside.com 2019 - 2024. All rights reserved.