sourcegraph

More advanced search with SourceGraph


I am trying to create a query that states the following:

Find me repos that have file 'baz', which contain 'foo', and also contain file 'bar'.

What I have now doesn't include the second part:

file:baz foo

Solution

  • This query can't be expressed in the current query syntax, which was designed primarily for finding text/regex matches in code.

    However, we're expanding search to cover more advanced queries, so I've filed an issue here for this feature: https://github.com/sourcegraph/issues/issues/127. Thanks for using Sourcegraph and feel free to comment on the issue with more context about your use case :)