From 3c1f27346f75caf64ed0c4138009510133f8c683 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 17 Aug 2015 23:12:09 -0400 Subject: Add git-stats.sh to output the shortlog in graph form Gets the git shortlog and outputs a graph of the commit count. TODO: Only first names are extracted with awk. Get full names. --- git-stats.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 git-stats.sh (limited to 'git-stats.sh') diff --git a/git-stats.sh b/git-stats.sh new file mode 100755 index 0000000..f63fe4d --- /dev/null +++ b/git-stats.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env sh + +function usage () { + echo "Usage: $0 path/to/git/repository" +} + +if [ $# != 1 ]; then + usage + exit 1 +fi + + +GIT_REPO=$1 + +cd $GIT_REPO + +git shortlog -ns --no-merges | awk '{printf "%s:%s\n", $2, $1}' | asciigraph -l "$1" --color -- cgit v1.2.3