unixorn/git-extra-commands

View on GitHub
bin/git-thanks

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash
# Author: Mislav Marohnić  <mislav.marohnic@gmail.com>
# https://github.com/mislav/dotfiles
#
# Usage: git-thanks <since>..<until>
#
# All commits on master, ever:
#   git-thanks master
#
# All commits on master since the 0.9.0 tag:
#   git-thanks 0.9.0..master

git log "$1" |
  grep Author: |
  sed 's/Author: \(.*\) <.*/\1/' |
  sort |
  uniq -c |
  sort -rn |
  sed 's/ *\([0-9]\{1,\}\) \(.*\)/\2 (\1)/'