https://github.com/etcwilde/mergetree-db
Merge Tree Implementation that integrates with cregit/cregit database
https://github.com/etcwilde/mergetree-db
cregit git
Last synced: 3 months ago
JSON representation
Merge Tree Implementation that integrates with cregit/cregit database
- Host: GitHub
- URL: https://github.com/etcwilde/mergetree-db
- Owner: etcwilde
- License: bsd-3-clause
- Created: 2017-10-27T23:46:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-15T05:17:18.000Z (over 8 years ago)
- Last Synced: 2025-02-28T23:03:19.059Z (over 1 year ago)
- Topics: cregit, git
- Language: C++
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.org
- License: LICENSE
Awesome Lists containing this project
README
* MergeTree
The MergeTree is a datastructure used to show how a commit is integrated into the master branch of a repository.
This implementation operates on the Linux repository and the data generated for [[https://cregit.linuxsources.org/][cregit]].
It adds a new table pathtomerge, with the following schema:
| Column Name | Type | Description |
|-------------+----------+---------------------------------------------|
| cid | char(40) | Commit hash |
| next | char(40) | Next commit on the way to the master branch |
| dist | int | Hops from the master branch |
| master | char(40) | Integrating merge into the master branch |
* Cregit
Cregit is a project designed to show who is contributing code to the kernel. ~git blame~ shows some, but only at the line-level. Cregit digs deeper, breaking the patch down to the token level, giving a much finer-grained account of the changes being made.
This implementation of the MergeTree uses the database generated for Cregit to provide information on the merge trees. Cregit uses the ~slickGitLog~ component to generate the database.
The generated database produces 4 tables:
- commits
- parents
- logs
- footers
** Commits
Commits contains the metadata for each commit in the repository.
| Column Name | Type | Description |
|-------------+----------+---------------------------------------------------------------|
| cid | char(40) | Commit hash |
| autname | text | Author's name |
| autemail | text | Author's email |
| autdate | text | Date commit was authored 'year-month-day hour:minute:second' |
| comname | text | Committer's name |
| comemail | text | Committer's email |
| comdate | text | Date commit was committed 'year-month-day hour:minute:second' |
| summary | text | Commit log summary |
| ismerge | boolean | Is commit a merge commit? |
** Parents
Contains the repository graph structure. This is the main table used for generating the merge trees.
| Column Name | Type | Description |
|-------------+----------+-------------------------|
| cid | char(40) | Commit hash |
| idx | integer | Order of commit parents |
| parent | char(40) | Parent's commit hash |
** logs
Contains the information about the logs.
| Column Name | Type | Description |
|-------------+----------+-----------------------------|
| cid | char(40) | Commit hash |
| log | text | The full commit log message |
This is kept as a separate table from ~commits~ since some commit messages are very long.
** footers
Contains information on who is signing off on commits.
| Column Name | Type | Description |
|-------------+----------+---------------------------------------|
| cid | char(40) | Commit hash |
| idx | integer | Order of comments |
| key | text | The type of information in the footer |
| value | text | The actual information |
An example of a ~key~ might be: "Signed-off-by" and the ~value~ might be "Linus Torvalds ".
idx is used when multiple (cid, key) pairs are the same. This happens when multiple people sign off on a commit, for example.