A very simple CLI to check who’s done the most commits/edits on a git repo, without having to remember the magic incantation for the git shortlog
command every time.
I wrote this in Rust using
$ rustc --version
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
I’m pretty sure the Rust Minimum Supported Version is way lower than that but I have no way of testing it.
If you have rust installed (see https://www.rust-lang.org) you can build the project with cargo, as usual: cargo build --release
.
Then you can put the resulting CLI (./target/release/whos-done-that
) anywhere in your $PATH, since most of the dependencies are statically linked:
$ ldd target/release/whos-done-that
linux-vdso.so.1 (0x000075253371a000)
libc.so.6 => /usr/lib/libc.so.6 (0x000075253336d000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x000075253371c000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x000075253333f000)
For a one-liner installer, this will do the trick (provided you have cargo
installed) :
cargo install --git https://github.com/vvzen/whos-done-that.git main
Since this was written in an afternoon and a bit, there’s no a lot of bells and whistles.
You just need to point the CLI at a valid git repo, by using the -t/--target-dir
flag.
The actual result will be written to stdout so you can manipulate it via the usual UNIX tools, e.g.:
$ whos-done-that -t ~/dev/personal/opensource/OpenColorIO | head -n 5
INFO Getting a list of authors..
INFO Compiling stats..
Jeremy Selan has made 507 commits: 61221 additions and 362789 removals
Patrick Hodoul has made 314 commits: 942 additions and 367 removals
Michael Dolan has made 135 commits: 493 additions and 35 removals
Bernard Lefebvre has made 95 commits: 0 additions and 0 removals
hodoulp has made 89 commits: 3384 additions and 2973 removals