Skip to content

Search backend: fix HEAD being displayed when no input rev was specified

Warren Gifford requested to merge cc/fix-head into main

Created by: camdencheek

This fixes an issue that was introduced in https://github.com/sourcegraph/sourcegraph/pull/38773 where, if you search with a repo: filter but with no revision, we would return and display results with @HEAD as the revision.

Screen Shot 2022-07-18 at 10 26 09

Test plan

There were tests that covered this, but there were similar changes that were actually expected, so I misunderstood the tests that I had changed as part of that PR. I've reverted the state of those tests to where they were before the change. Also manually tested to see that the HEAD rev does not show up when not specified.

Merge request reports

Loading