Files
Nick K f7c115da4e Improving the documentation
- updated .gitignore to not ignore build.properties
- added missing one-jar build to slickGitLog
- added build.properties
- updated readme
- updated .gitignore
- updated readme
- updated readme

Author:    Nick K <nick.karamanian@gmail.com>
Date:      Fri May 10 12:47:28 2019 -0700
2019-05-10 15:10:46 -07:00
..
2019-05-10 15:10:46 -07:00
2019-05-10 15:10:46 -07:00
2017-04-07 23:27:40 -07:00

Introduction

This program scans a git repository and extracts metadata of the commits into a sqlite3 database

How to run

java -jar gitLogToDB.jar <dbfile> <pathToGitrepo>

Schema

  • Main commits table
CREATE TABLE commits (
    cid character(40),
    autname TEXT,
    autemail TEXT,
    autdate TEXT,
    comname TEXT,
    comemail TEXT,
    comdate TEXT,
    summary varchar,
    ismerge boolean,
    PRIMARY KEY(cid));
  • Parents of commits
CREATE TABLE parents (
    cid character(40),
    idx integer,
    parent character(40),

    PRIMARY KEY(cid,idx),
    FOREIGN KEY(cid) REFERENCES commits(cid),
    FOREIGN KEY(parent) REFERENCES commits(cid)
);
  • Footers (such as Sign-Off-By)
CREATE TABLE footers (
    cid character(40),
    idx integer,
    key TEXT,
    value TEXT,

    PRIMARY KEY(cid,idx),
    FOREIGN KEY(cid) REFERENCES commits(cid),
    FOREIGN KEY(parent) REFERENCES commits(cid)
);
  • Full log. it is stored in a different table due than commits
CREATE TABLE logs (
    cid character(40),
    log TEXT,

    PRIMARY KEY(cid),
    FOREIGN KEY(cid) REFERENCES commits(cid)
);

License

This software is licensed under the GPL+3.0

jgit https://eclipse.org/jgit/ BSD3
poi scala https://github.com/folone/poi.scala Apache-2.0
apache poi https://poi.apache.org/ Apache-2.0
slick http://slick.lightbend.com/ MIT
sqlite-jdbc Apache-2.0
HikariCP Apache-2.0

TODO

  • many of the footers returned by jgit are invalid. there is need for a whitelist of key values.