Skip to content

search: add NOT as syntactic sugar

Administrator requested to merge sh/not-as-syntactic-suggar into master

Created by: stefanhengl

Fixes #9976, relates to RFC94

This PR adds NOT as syntactic sugar to our query syntax. We support NOT for all negatable fields. If NOT comes before an unsupported field, we wrap the operand in a negated content field.

Examples

query equivalent to
not file:foo -file:foo
not repo:foo -repo:foo
not content:foo -content:foo
not foo -content:foo
not foo:bar (unknown keyword) -content:"foo:bar"

Merge request reports

Loading