Gets the time somebody worked on something from git log
.
This is a simple tool which grabs the output of git log --numstat
and
analyzes how much time somebody worked on the project.
For instance, simply call one of the following lines to see all commits that fit the criteria and how much time was spend creating them.
commit-analyzer --git --author-equals wert007
commit-analyzer --input git.log --author-equals wert007
You can also give commit-analyzer
an output file such that it will
generate a CSV with the date, the number of commits made on the respective
days and the LOC changes due to them.
commit-analyzer --git --output commits-and-loc-by-date.csv
commit-analyzer --input git.log --output commits-and-loc-by-date.csv
--author-contains
, -a
Filters for certain author names. ORs if specified multiple times.
--author-equals
Filters for certain author names. ORs if specified multiple times.
--commit-contains
, -c
Filters for certain commit hashes. ORs if specified multiple times.
--commit-equals
Filters for certain commit hashes. ORs if specified multiple times.
--duration
, -d
The time which may pass between two commits that still counts as working [default: 3].
--email-contains
, -e
Filters for certain author emails. ORs if specified multiple times.
--email-equals
Filters for certain author emails. ORs if specified multiple times.
--file-extension
, -f
Filters the LOC diff for a certain file extension (e.g. --file-extension cpp
). ORs if specified multiple times.
--help
, -h
Print help information.
--message-starts-with
, -l
Filters for certain commit messages. ORs if specified multiple times.
--message-contains
, -m
Filters for certain commit messages. ORs if specified multiple times.
--message-equals
Filters for certain commit messages. ORs if specified multiple times.
--output
, -o
An output file for the commits per day in CSV format.
--verbose
, -v
Always shows the entire output.
--version
, -V
Print version information.
git-history
Reads the input from the local Git history.
help
Print a general help message or the help of the given subcommand(s).
log-file
Reads the specified input file.
stdin
Reads from stdin
.
Installation is very easy with Cargo. Just execute the following line in a terminal:
cargo install --git https://github.com/wert007/commit-analyzer
This command will install a release compilation of the latest version locally to your user account. The same command also works for regular updates, this is, new commits have had been introduced since the last installation.