blob: 540e1ab6ee3f4d544fb48976a6f10c591e9a08fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
function usage () {
echo "Usage: $0 path/to/git/repository"
}
if [ $# != 1 ]; then
usage
exit 1
fi
GIT_REPO=$1
cd $GIT_REPO
shortlog=$(git shortlog -ns --no-merges)
echo "$shortlog" | awk '{
for (i = 2; i <= NF; i++) {
printf "%s", $i
if (i != NF) printf " "
}
printf ":%s\n", $1
}' | asciigraph -l "Commit count" --color
|