src-d / borges

borges collects and stores Git repositories.
https://docs.sourced.tech/borges/
GNU General Public License v3.0
52 stars 20 forks source link

borges: check if siva file is empty when it shouldn't #366

Closed jfontan closed 6 years ago

jfontan commented 6 years ago

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:

Note: we need an index in Reference.Init

Fixes: #365

ajnavarro commented 6 years ago

@jfontan check the CI, codecov is not executed.

jfontan commented 6 years ago

@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.

ajnavarro commented 6 years ago

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

jfontan commented 6 years ago

I've just checked and there's already an index in init:

CREATE INDEX IF NOT EXISTS idx_references_init ON "repository_references" ("init");