<commit_before>#!/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

git shortlog -ns --no-merges | awk '{printf "%s:%s\n", $2, $1}' | asciigraph  -l "$1" --color<commit_msg>git-stats.sh: Move shortlog output to variable<commit_after>#!/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 '{printf "%s:%s\n", $2, $1}' | asciigraph  -l "$1" --color
{'fraction_non_alphanumeric': 0.19970193740685543, 'fraction_numerical': 0.020864381520119227, 'mean_word_length': 3.392156862745098, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '48137', 'n_tokens_mistral': 305, 'n_tokens_neox': 292, 'n_words': 76}