Closed jfontan closed 6 years ago
@jfontan check the CI, codecov is not executed.
@ajnavarro now coverage is sent. It was disabled after updating to ci v1. Previously this was done by test-coverage
. Now it is done in codecov
.
Just to do not forget. If we need an index, we should add it here: https://github.com/src-d/core-retrieval/blob/master/schema/sql/schema.sql
I've just checked and there's already an index in init
:
CREATE INDEX IF NOT EXISTS idx_references_init ON "repository_references" ("init");
If there are mentions to the init commit in any reference it checks that the siva is not empty (contains at least one commit).
To do this two new functions are added to
RepositoryStore
interface:GetRefsByInit
: Gets all references that have the provided init commit. Still not used but will be needed soon to fix problems with missing or broken siva files.InitHasRefs
: Returns true if there's a reference with an specific init commit. Similar toGetRefsByInit
but faster because it only check that at least one reference has it and does not retrieve repository data.Note: we need an index in
Reference.Init
Fixes: #365