Reputation: 3171
git push origin HEAD:refs/for/master%topic='test topic'
This fails with error fatal: remote part of refspec is not a valid name in HEAD:refs/for/master%topic=test topic
I tried %topic='\"test\ topic\"'
, %topic='test\ topic'
but it didn't work, problem is the whitespace, it supports %topic='test_topic'
How do I escape the whitespace?
Upvotes: 1
Views: 446
Reputation: 94755
Try
git push origin HEAD:refs/for/master -o topic='test topic'
See https://gerrit-documentation.storage.googleapis.com/Documentation/3.0.4/intro-user.html#topics
Upvotes: 2
Reputation: 532053
There's no such thing as a "topic" in Git. You are just using some conventions to embed metadata about the branch in its name. See man git-check-ref-format
for information about what characters are permitted in a branch name. Most relevant is rule 4:
- They cannot have ASCII control characters (i.e. bytes whose values are lower than \040, or \177 DEL), space, tilde ~, caret ^, or colon : anywhere.
Upvotes: 0