#!/bin/bash # # totally sniff every line in history to see whose # are the lines here path="${1:-}" maybe_path="" test -n "$path" && maybe_path="-- $path" git ls-tree -r -z --name-only HEAD $maybe_path \ | xargs -0 -n1 git blame --line-porcelain HEAD \ | grep "^author " \ | sort \ | uniq -c \ | sort -nr