<commit_before>
// sdk
import io/File
import structs/ArrayList
import os/[Process]

// ours
import eggplant/[warehouse, utils]
import eggplant/[eggsanity]

egg_push: func {
    w := Warehouse new()

    "Doing a few sanity checks first..." println()
    repos := w getRepos()
    for (r in repos) {
        "#{r name}... " print()
        egg_sanity_for(r)
    }

    args := ArrayList<String> new()
    args add("rsync")
    args add("--archive")
    args add("--delete")
    args add("--progress")
    args add("--human-readable")
    args add("--rsh=ssh")
    args add(".") // src
    args add(w getUrl()) // dst
    "Will push #{w base path}, launching the following command:" println()
    "> #{args join(" ")}" println()

    if (!confirm()) {
        bail("Aborted by user demand.")
    }

    p := Process new(args)
    p setCwd(w base path)
    ret := p execute()
    if (ret != 0) {
        bail("rsync has errors.")
    }
}
<commit_msg>Exclude git<commit_after>
// sdk
import io/File
import structs/ArrayList
import os/[Process]

// ours
import eggplant/[warehouse, utils]
import eggplant/[eggsanity]

egg_push: func {
    w := Warehouse new()

    "Doing a few sanity checks first..." println()
    repos := w getRepos()
    for (r in repos) {
        "#{r name}... " print()
        egg_sanity_for(r)
    }

    args := ArrayList<String> new()
    args add("rsync")
    args add("--archive")
    args add("--delete")
    args add("--progress")
    args add("--human-readable")
    args add("--rsh=ssh")
    args add("--exclude")
    args add(".git")
    args add(".") // src
    args add(w getUrl()) // dst
    "Will push #{w base path}, launching the following command:" println()
    "> #{args join(" ")}" println()

    if (!confirm()) {
        bail("Aborted by user demand.")
    }

    p := Process new(args)
    p setCwd(w base path)
    ret := p execute()
    if (ret != 0) {
        bail("rsync has errors.")
    }
}

{'fraction_non_alphanumeric': 0.17276946879834967, 'fraction_numerical': 0.0010314595152140279, 'mean_word_length': 2.385689354275742, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3800385', 'n_tokens_mistral': 673, 'n_tokens_neox': 643, 'n_words': 193}