<commit_before># vi: ft=bash
# Source me

function _save_commit_messages {
    commit_messages+=("$1")
}

function has_commits {
    local -r count=$1
    shift

    local commit_messages=()
    commit_messages_from _save_commit_messages HEAD
    "$@"
}

SCENARIO 'New repo' \
    GIVEN new_repo \
        AND with_commit some-file 'First commit'
    WHEN nothing \
    THEN has_commits 1<commit_msg>Fix scenario name<commit_after># vi: ft=bash
# Source me

function _save_commit_messages {
    commit_messages+=("$1")
}

function has_commits {
    local -r count=$1
    shift

    local commit_messages=()
    commit_messages_from _save_commit_messages HEAD
    "$@"
}

SCENARIO 'Count commits' \
    GIVEN new_repo \
        AND with_commit some-file 'First commit'
    WHEN nothing \
    THEN has_commits 1
{'fraction_non_alphanumeric': 0.08899876390605686, 'fraction_numerical': 0.007416563658838072, 'mean_word_length': 3.1968911917098444, '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': '3369646', 'n_tokens_mistral': 284, 'n_tokens_neox': 274, 'n_words': 69}