schema: Support more checkout data in v4.5 #87
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for three more checkout fields:
git_commit_tags
,git_commit_message
, andgit_repository_branch_tip
.The
git_commit_tags
is an array of strings representing annotated tags pointing directly at the commit being checked out, as seen in the source repository. I.e. the output ofgit tag --points-at <commit>
. Set to an empty array, if the commit has no tags.The
git_commit_message
is intended to hold the complete message of the commit being checked out, both subject and body. I.e. the output ofgit show -s --format=%B
. We're putting the subject and the body together, as it's quite easy to extract the subject in SQL, while full-text search is easier and more efficient to do over a single column.Finally, the
git_repository_branch_tip
is a boolean flag, which should be set totrue
, when the commit being checked out is at the tip of the branch at the moment of the checkout (as specified instart_time
). Essentially, if you're always testing only the tip of the branch, you can set this totrue
unconditionally. This flag would let us extract the checkouts which represented the branch state over time, and produce a rough history of branch changes, which we can then use for (regression) analysis and graphs, in lieu of actual commit graph walking.