Error while doing git push with topic

397 views
Skip to first unread message

pythong beginner

unread,
Jun 28, 2019, 11:51:57 PM6/28/19
to Repo and Gerrit Discussion
Hi

I got the following error while doing a git push, that's because there is a space in the topic value,I tried two different ways (with and without quotes), is there a way to push when the topic field has spaces or should I be escaping the spaces?

-bash-4.1$ git --git-dir=/mnt/data1/logs/tech_projects/tech-ci/.git --work-tree=/mnt/data1/logs/tech_projects/tech-ci push origin HEAD:refs/for/milestoneE%topic='123456, 789101_milestoneE',r=username1@company.com
fatal
: remote part of refspec is not a valid name in HEAD:refs/for/milestoneE%topic='123456, 789101_milestoneE',r=username1@company.com

bash
-4.1$ git --git-dir=/mnt/data1/logs/tech_projects/tech-ci/.git --work-tree=/mnt/data1/logs/tech_projects/tech-ci push origin HEAD:refs/for/milestoneE%topic=123456, 789101_milestoneE,r=username1@company.com
error
: src refspec 789101_milestoneE,r=username1@company.com does not match any.
error
: failed to push some refs to 'ssh://b...@tech-gerrit.sd.company.com:29418/tech-ci.git'

pythong beginner

unread,
Jun 30, 2019, 5:31:23 PM6/30/19
to Repo and Gerrit Discussion
Does anyone have inputs here?

Sven Selberg

unread,
Jul 1, 2019, 2:34:20 AM7/1/19
to Repo and Gerrit Discussion
I don't think whitespace is allowed in the remote refspec.
 '123456, 789101_milestoneE'
Topic is not a collection.

David Pursehouse

unread,
Jul 1, 2019, 2:41:26 AM7/1/19
to Sven Selberg, Repo and Gerrit Discussion
On Mon, Jul 1, 2019 at 3:34 PM Sven Selberg <sven.s...@axis.com> wrote:
I don't think whitespace is allowed in the remote refspec.
 '123456, 789101_milestoneE'
Topic is not a collection.


Commas and spaces are allowed in topic names.  I haven't tried it from the command line, but URL encoding them should work.

 
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/4ded8f05-a87d-44b8-ab42-ae7863fecd4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William

unread,
Jun 9, 2021, 5:03:22 PM6/9/21
to Repo and Gerrit Discussion

using urllib.quote(topic)  as part of git push did NOT work actually

Reply all
Reply to author
Forward
0 new messages