<commit_before>#!/bin/bash

git show-ref --tags | grep "`git log -n 1 --pretty='%H'`"

if [[ $? == 1 ]]; then
    REVISION=$(git log -n 1 --pretty='%h')
    [[ $REVISION ]] && sed -i -e "s/Version = \"\([0-9.]*\)\"/Version = \"\1~git:$REVISION\"/g" src/global.h
fi

cat src/global.h | grep Version | awk '{print $(NF)}' | sed -e 's/[";~]//g' -e 's/:/-/g'
<commit_msg>Redirect grep to /dev/null<commit_after>#!/bin/bash

git show-ref --tags | grep "`git log -n 1 --pretty='%H'`" > /dev/null

if [[ $? == 1 ]]; then
    REVISION=$(git log -n 1 --pretty='%h')
    [[ $REVISION ]] && sed -i -e "s/Version = \"\([0-9.]*\)\"/Version = \"\1~git:$REVISION\"/g" src/global.h
fi

cat src/global.h | grep Version | awk '{print $(NF)}' | sed -e 's/[";~]//g' -e 's/:/-/g'

{'fraction_non_alphanumeric': 0.30171277997364954, 'fraction_numerical': 0.015810276679841896, 'mean_word_length': 2.5849056603773586, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1173402', 'n_tokens_mistral': 361, 'n_tokens_neox': 329, 'n_words': 82}