<commit_before>#! /bin/bash
# git setup

# config function
# Args: 1:section 2:key
# Usage: config user name
# -- Prompts for user name and then does git config --global user.name $input
config() {
    read -p "Enter git $1 $2 > " u_in
    git config --global $1.$2 "$u_in"
    echo "git $1 $2 = $u_in"
}

echo "Configuring git..."
echo

# reconfigure user name, email address
echo "Configure user name and email..."
name=$(git config --global --get user.name)
email=$(git config --global --get user.email)

if [[ -z "$name" ]]; then
    echo "No previous user name"
    config user name
else
    echo "Previous user name: $name"
    read -n 1 -p "Is [name = $name] ok [Y/n] ? " nameok && echo
    if [[ !($nameok =~ ^(y|Y)) ]]; then
        config user name
    fi
fi
echo

if [[ -z "$email" ]]; then
    echo "No previous user email"
    config user email
else
    echo "Previous user email: $email"
    read -n 1 -p "Is [email = $email] ok [Y/n] ? " emailok && echo
    if [[ !($emailok =~ ^(y|Y)) ]]; then
        config user email
    fi
fi
echo

echo "...done with user info"

echo "Configure global gitignore..."

# replace with the name of your global gitignore file if you've changed it
globalignore="~/.gitignore_global"
git config --global --replace-all core.excludesfile "$globalignore"
echo "...done with global gitignore"

echo "...done configuring git"<commit_msg>[Refs #9,#10] Quick format fix<commit_after>#! /bin/bash
# git setup

# config function
# Args: 1:section 2:key
# Usage: config user name
# -- Prompts for user name and then does git config --global user.name $input
config() {
    read -p "Enter git $1 $2 > " u_in
    git config --global $1.$2 "$u_in"
    echo "git $1 $2 = $u_in"
}

echo "Configuring git..."
echo

# reconfigure user name, email address
echo "Configure user name and email..."
name=$(git config --global --get user.name)
email=$(git config --global --get user.email)

if [[ -z "$name" ]]; then
    echo "No previous user name"
    config user name
else
    echo "Previous user name: $name"
    read -n 1 -p "Is [name = $name] ok [Y/n] ? " nameok && echo
    if [[ !($nameok =~ ^(y|Y)) ]]; then
        config user name
    fi
fi
echo

if [[ -z "$email" ]]; then
    echo "No previous user email"
    config user email
else
    echo "Previous user email: $email"
    read -n 1 -p "Is [email = $email] ok [Y/n] ? " emailok && echo
    if [[ !($emailok =~ ^(y|Y)) ]]; then
        config user email
    fi
fi
echo

echo "...done with user info"
echo

echo "Configure global gitignore..."

# replace with the name of your global gitignore file if you've changed it
globalignore="~/.gitignore_global"
git config --global --replace-all core.excludesfile "$globalignore"
echo "...done with global gitignore"
echo

echo "...done configuring git"
{'fraction_non_alphanumeric': 0.14614003590664273, 'fraction_numerical': 0.008258527827648115, 'mean_word_length': 2.8965034965034966, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1722629', 'n_tokens_mistral': 937, 'n_tokens_neox': 913, 'n_words': 373}