1
0
dotfiles/bash/git-stat

5 lines
227 B
Plaintext
Raw Permalink Normal View History

2024-07-13 16:52:11 +02:00
#!/bin/bash
git log --pretty=format:==%an --numstat | \
sed -r '/==.*/{s/^==//;h;D};/^$/D;s/-/0/g;s/\t[^\t]+$//;G;s/(.*)\n(.*)/\2\t\1/' \
| awk -F '\t' '{add[$1]+=$2;del[$1]+=$3} END {for (i in add) {print i,add[i],del[i]}}'