summaryrefslogtreecommitdiff
path: root/artix/home/.local/bin/gitlc
blob: 8dd982fd97d274e5236de72b16839eac9f69ff38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/bash

git log --format="%aN" --numstat | \
awk '
NF==0 { next }

$1 ~ /^[0-9]+$/ {
    add[author]+=$1
    del[author]+=$2
    next
}

$1 == "-" { next }

author=$0

END {
    for (a in add)
        printf "%s : +%d / -%d / net %d\n", a, add[a], del[a], add[a]-del[a]
}'