src-d / gitbase

SQL interface to git repositories, written in Go. https://docs.sourced.tech/gitbase
Apache License 2.0
2.07k stars 123 forks source link

Varchar #916

Closed juanjux closed 5 years ago

juanjux commented 5 years ago

Fixes #824.

Switch some types to VARCHAR with a size, mostly those of know length or maximum length like hashes (40), entry_modes (16), and emails (254 according to the last RFC). Probably some types like paths, repository_ids and URLS could be switched too, but we should choose a "safe" length for those. One option is to check the length used in git source code; I did that for a couple like the git message length but it used size_t.

ajnavarro commented 5 years ago

@juanjux could you check tests please?

juanjux commented 5 years ago

@ajnavarro I don't know wtf is happening with the Travis build and the TestBuildSquashedTable test because, of course, It Works On My Machine :tm: but I'm investigating.

juanjux commented 5 years ago

Could reproduce the problem by going to the specific directory of the test. Now I just need to understand wtf those numbers differ.

erizocosmico commented 5 years ago

Can you rebase?

juanjux commented 5 years ago

@erizocosmico fifth rebase done :1st_place_medal: the bug in the test should be fixed now @ajnavarro so it should be ready to merge if Travis works.

juanjux commented 5 years ago

Ok, it failed again, daaaamn

juanjux commented 5 years ago

Worked, @ajnavarro can I have a sweet merge?

ajnavarro commented 5 years ago

The schema and docu changed too! well done!