<commit_before>#!/bin/sh
#
# GIT-HIST --Customised version of git log that shows a colourful graph.
#
git log --graph \
      --pretty='format:%C(bold)%h%d%Creset %ar %Cgreen%an%Creset %s'  "$@";<commit_msg>added option processing, date formatting<commit_after>#!/bin/sh
#
# GIT-HIST --Customised version of git log that shows a colourful graph.
#
PATH=$PATH:/usr/libexec:/usr/local/libexec
. getopt.shl
. log.shl

#
# usage() --echo this script's usage message.
#
usage()
{
    cat <<EOF
git-hist: show the recent history of changes in this repository
EOF
    getopt_usage "git-hist [options] <git-log arguments>" "$1"
}

opts="r.relative_date;$LOG_GETOPTS"
eval $(getopt_long_args -d "$opts" "$@" || usage "$opts" >&2)
log_getopts

if [ "$relative_date" ]; then
    date_fmt='%ar'
else
    date_fmt='%aD'
fi

log_format="%C(bold)%h%C(cyan)%d%Creset $date_fmt %Cgreen%an%Creset %s"
git log --graph --pretty="format:$log_format" "$@"
{'fraction_non_alphanumeric': 0.17470525187566988, 'fraction_numerical': 0.0021436227224008574, 'mean_word_length': 4.430232558139535, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, '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': '1251031', 'n_tokens_mistral': 366, 'n_tokens_neox': 355, 'n_words': 88}