Skip to content

search: clean up parseDescriptionPattern

Administrator requested to merge tl/clean-up-parse-description-pattern into main

Created by: tbliu98

Resolving lingering issues from https://github.com/sourcegraph/sourcegraph/pull/39117

  1. We want to be able to represent searching for repos with empty descriptions. Previously that was not possible because when exact contained an empty string "" as its sole element, we would append TRUE to the query condition and move on, so repo:has.description(^$) would match all descriptions instead of just empty ones.

  2. We should treat exact != nil and len(exact) != 0 as the same condition.

Test plan

Manually verify in traces that the arguments passed to the database query are correct.

Merge request reports

Loading