Search code examples
sshgerrit

Gerrit ssh: fatal: "-is:wip" is not a valid option


I'm trying to make a query request using gerrit ssh command tool.

I want to exclude some parts of a query.

In both Gerrit UI and REST API this could be done by addint "-", e.g.: https://android-review.googlesource.com/q/-is:wip

And the documentation shows such examples: enter image description here

But when I try to do this using ssh:

ssh -p 29418 gerrit gerrit query --format json -is:wip I'm getting an error:

fatal: "-is:wip" is not a valid option

What I tried:

  • '-is:wip'
  • "-is:wip"
  • '"-is:wip"'
  • '\-is:wip'
  • '"\-is:wip"'
  • \-is:wip
  • '"\\-is:wip' and so on

Nothing works.

But if I won't use "-", then query works fine: ssh -p 29418 gerrit gerrit query --format json status:wip

How can I search for what I want in Gerrit via ssh?


Solution

  • Try this:

    ssh -p 29418 gerrit gerrit query --format json NOT is:wip