codeintel/gitserver: add DefaultBranchContains functionality
Created by: slimsag
For indexing API docs for search, we will introduce new tables that contain
FTS indexes. To reduce the amount of data that must be in a FTS index, we will
only write to these tables if the default branch (main
, master
, etc)
contains the commit.
As such, we need a gitserver API to do this. This implementation is not perfect, and as such there is a TODO, but since it would only be invoked once per upload it seems sufficient for now. Sending as a separate PR to get feedback on if this is OK or not.
I will of course follow up on adding a more optimal implementation and adding tests for this later, tracking issue: #25194
Helps #21938
Signed-off-by: Stephen Gutekanst [email protected]