git-guilt
is a custom tool written for the Git Source Code Management system. It aims to provide information regarding the transfer of ownership between two revisions of a repository. Think of it as a first-order derivative of git-blame!
git-guilt
is a Python port of Tim Pettersen's JavaScript tool of the same name.
git-guilt
does not require any dependency beside Python and Git (and argparse in case your version of Python doesn't include it). To install, simply type:
$ pip install git-guilt
git-guilt
can be used to identify code reviewers. Authors whose overall ownership of the repository decreases for a given commit will often have valuable feedback to provide during a code review. Yesterday's design decisions may still be relevant today. And even if they're not, this is a great opportunity to learn from past mistakes!- Likewise,
git-guilt
can be used to run periodic audits on the ownership of code in a repo. Middle managers love this stuff!
Please read the docs.
Once you've cloned this repository, be sure to install the build-time dependencies and you'll be ready to starting hacking away on your working copy. Please use tox as your one-stop shop to ensure that all code checks and tests pass on both Python 2 and Python 3 - it's what the continuous integration hook requires for pull requests.
$ pip install -r requirements.txt
$ tox
Unit tests and integration tests are run for every commit. git-guilt
is tested on Python 2.7, and 3.5.
git-guilt
tries to be Unicode-friendly. There are tests for non-Latin character support in author names, repository paths and terminal output.
git-guilt
has only been tested on Linux so far. I expect some work to be needed to port terminal handling code to macOS. Support for Microsoft Windows would likely require more work.