<commit_before>#!/bin/bash

if [ -z ${1} ]; then
	echo "should be called with a path"
	exit
fi
ROOTDIR=${1}

CUSTOM_STR=${CUSTOM_STR:-https://git.linaro.org/lng/odp.git}
if [ -d ${ROOTDIR}/.git ]; then
	hash=$(git --git-dir=${ROOTDIR}/.git describe | tr -d "\n")
	if git --git-dir=${ROOTDIR}/.git diff-index --name-only HEAD &>/dev/null ; then
		dirty=-dirty
	fi

	echo -n "'${CUSTOM_STR}' (${hash}${dirty})">${ROOTDIR}/.scmversion
fi<commit_msg>scripts/git_hash: fix bug where dirty was always set<commit_after>#!/bin/bash

if [ -z ${1} ]; then
	echo "should be called with a path"
	exit
fi
ROOTDIR=${1}

CUSTOM_STR=${CUSTOM_STR:-https://git.linaro.org/lng/odp.git}
if [ -d ${ROOTDIR}/.git ]; then
	hash=$(git --git-dir=${ROOTDIR}/.git describe | tr -d "\n")
	if [[ $(git --git-dir=${ROOTDIR}/.git diff --shortstat 2> /dev/null \
		| tail -n1) != "" ]]; then
		dirty=-dirty
	fi

	echo -n "'${CUSTOM_STR}' (${hash}${dirty})">${ROOTDIR}/.scmversion
fi
{'fraction_non_alphanumeric': 0.2305263157894737, 'fraction_numerical': 0.00631578947368421, 'mean_word_length': 3.661764705882353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '6496780', 'n_tokens_mistral': 397, 'n_tokens_neox': 385, 'n_words': 90}