pg_search
https://github.com/casecommons/pg_search
Ruby
pg_search builds ActiveRecord named scopes that take advantage of PostgreSQL’s full text search
Gitlab::Diff::DiffRefs#complete?
There is only one case in which we will have `start_sha` and `head_sha`, but not `base_sha`, which is when a diff is generated between an orphaned branch and another branch, which means there _is_ no base, but we're still able to highlight it, and to create diff notes, which are the primary things `DiffRefs` are used for. `DiffRefs` are "complete" when they have `start_sha` and `head_sha`, because `base_sha` can always be derived from this, to return an actual sha, or `nil`. We have `base_sha` directly available on `DiffRefs` because it's faster# than having to look it up in the repo every time.
Edit
git clone [email protected]:casecommons/pg_search.git
cd pg_search
open
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Gitlab--Diff--DiffRefs-complete--for-pr
# Commit to gitgit add git commit -m "better docs for Gitlab::Diff::DiffRefs#complete?"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Gitlab--Diff--DiffRefs-complete--for-pr
hub pull-request
# Celebrate!