<commit_before>#!/bin/bash
#This script will create a list of tests to be done for the current commit.
root_folder=$(git rev-parse --show-toplevel);
echo "Changing directory to $root_folder";
cd "$root_folder/tests"; #will only cd if we are above tests
mkdir -p "$root_folder/tests/log";

branch_name=$(git symbolic-ref --short HEAD);
if [ "testing" == "$branch_name" ]
then
    echo "We are on the testing branch. A test log file will be created.";
    commit_name=$(git describe);
    target_file_name="$root_folder/tests/log/tests_for_$commit_name";
    if [ ! -f $target_file_name ]
    then
        echo "Create $target_file_name, please use it to document tests as passed or failed.";
        source_file="$root_folder/tests/List of Tests";
        cp "$source_file" "$target_file_name";
        git add "$target_file_name";
    else
        echo "$target_file_name already exists.";
        :
    fi
else
    echo "We are not on the testing branch. Nothing to do here.";
    :
fi<commit_msg>bugfix: git not working inside .git directory<commit_after>#!/bin/bash
#This script will create a list of tests to be done for the current commit.
root_folder=$(git rev-parse --show-toplevel);
branch_name=$(git symbolic-ref --short HEAD);
commit_name=$(git describe);
echo "Changing directory to $root_folder";
cd "$root_folder/tests"; #will only cd if we are above tests
mkdir -p "$root_folder/tests/log";

if [ "testing" == "$branch_name" ]
then
    echo "We are on the testing branch. A test log file will be created.";
    target_file_name="$root_folder/tests/log/tests_for_$commit_name";
    if [ ! -f $target_file_name ]
    then
        echo "Create $target_file_name, please use it to document tests as passed or failed.";
        source_file="$root_folder/tests/List of Tests";
        cp "$source_file" "$target_file_name";
        git add "$target_file_name";
    else
        echo "$target_file_name already exists.";
        :
    fi
else
    echo "We are not on the testing branch. Nothing to do here.";
    :
fi
{'fraction_non_alphanumeric': 0.11166007905138339, 'fraction_numerical': 0.0, 'mean_word_length': 3.4407894736842106, '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': '1324366', 'n_tokens_mistral': 617, 'n_tokens_neox': 606, 'n_words': 221}