<commit_before>#! /bin/bash

set -xv

test_branch()
{
    local git_branch
    git_branch=$(git rev-parse --abbrev-ref HEAD)
    # echo "TEST: Current branch: $git_branch"
    # echo "TEST: Test branch: $1"
    [[ "$1" = "$git_branch" ]] && echo "TEST: On correct branch: $1" || exit 1
}

cd $TRAVIS_BUILD_DIR/examples/cats

./breed.sh  || exit 1
clowder herd  || exit 1
clowder meow || exit 1
clowder groom || exit 1
./clean.sh || exit 1

./breed.sh || exit 1
clowder herd -v v0.1 || exit 1
clowder meow || exit 1

projects=( 'black-cats/kit' \
            'black-cats/kishka' \
            'black-cats/sasha' \
            'black-cats/jules' \
            'mu' \
            'duke' )

for project in "${projects[@]}"
do
	pushd $project &>/dev/null
    test_branch clowder-fix/v0.1
    popd &>/dev/null
done
echo ''

clowder meow || exit 1

black_cat_projects=( 'black-cats/kit' \
                    'black-cats/kishka' \
                    'black-cats/sasha' \
                    'black-cats/jules' )

for project in "${black_cat_projects[@]}"
do
	pushd $project &>/dev/null
    touch newfile
    git add newfile
    popd &>/dev/null
done

clowder meow || exit 1
clowder litter || exit 1
clowder meow || exit 1

for project in "${black_cat_projects[@]}"
do
	pushd $project &>/dev/null
    touch newfile
    git add newfile
    popd &>/dev/null
done

clowder meow || exit 1
clowder herd || exit 1
clowder litter || exit 1
clowder meow || exit 1
clowder herd || exit 1
clowder meow || exit 1

for project in "${projects[@]}"
do
	pushd $project &>/dev/null
    test_branch master
    popd &>/dev/null
done
echo ''

for project in "${projects[@]}"
do
	pushd $project &>/dev/null
    git checkout master~2
    popd &>/dev/null
done

clowder meow || exit 1
clowder herd || exit 1
clowder meow || exit 1
clowder litter || exit 1
clowder meow || exit 1

for project in "${projects[@]}"
do
	pushd $project &>/dev/null
    git checkout master
    popd &>/dev/null
done
echo ''

clowder meow || exit 1
clowder herd || exit 1
clowder meow || exit 1<commit_msg>Only checkout black cat branches to detached HEAD<commit_after>#! /bin/bash

set -xv

test_branch()
{
    local git_branch
    git_branch=$(git rev-parse --abbrev-ref HEAD)
    # echo "TEST: Current branch: $git_branch"
    # echo "TEST: Test branch: $1"
    [[ "$1" = "$git_branch" ]] && echo "TEST: On correct branch: $1" || exit 1
}

cd $TRAVIS_BUILD_DIR/examples/cats

./breed.sh  || exit 1
clowder herd  || exit 1
clowder meow || exit 1
clowder groom || exit 1
./clean.sh || exit 1

./breed.sh || exit 1
clowder herd -v v0.1 || exit 1
clowder meow || exit 1

projects=( 'black-cats/kit' \
            'black-cats/kishka' \
            'black-cats/sasha' \
            'black-cats/jules' \
            'mu' \
            'duke' )

for project in "${projects[@]}"
do
	pushd $project &>/dev/null
    test_branch clowder-fix/v0.1
    popd &>/dev/null
done
echo ''

clowder meow || exit 1

black_cat_projects=( 'black-cats/kit' \
                    'black-cats/kishka' \
                    'black-cats/sasha' \
                    'black-cats/jules' )

for project in "${black_cat_projects[@]}"
do
	pushd $project &>/dev/null
    touch newfile
    git add newfile
    popd &>/dev/null
done

clowder meow || exit 1
clowder litter || exit 1
clowder meow || exit 1

for project in "${black_cat_projects[@]}"
do
	pushd $project &>/dev/null
    touch newfile
    git add newfile
    popd &>/dev/null
done

clowder meow || exit 1
clowder herd || exit 1
clowder litter || exit 1
clowder meow || exit 1
clowder herd || exit 1
clowder meow || exit 1

for project in "${projects[@]}"
do
	pushd $project &>/dev/null
    test_branch master
    popd &>/dev/null
done
echo ''

for project in "${black_cat_projects[@]}"
do
	pushd $project &>/dev/null
    git checkout master~2
    popd &>/dev/null
done

clowder meow || exit 1
clowder herd || exit 1
clowder meow || exit 1
clowder litter || exit 1
clowder meow || exit 1

for project in "${black_cat_projects[@]}"
do
	pushd $project &>/dev/null
    git checkout master
    popd &>/dev/null
done
echo ''

clowder meow || exit 1
clowder herd || exit 1
clowder meow || exit 1
{'fraction_non_alphanumeric': 0.13455069678039405, 'fraction_numerical': 0.016818837097549257, 'mean_word_length': 2.5826161790017212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, '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': '1863530', 'n_tokens_mistral': 1617, 'n_tokens_neox': 1509, 'n_words': 480}