<commit_before>#!/usr/bin/env python

import os
import subprocess

def do_fetch(repo, remotes):

    ORIGINAL_COLOR = "\033[0m" # mvtodo: would be better to try to detect the terminal's current standard color
    report = []

    print("\n* Fetching %s ..." % repo)
    try:
        out = subprocess.check_output(["git", "--git-dir=%s" % repo, "--work-tree=%s" % os.path.dirname(repo), "fetch", "--multiple"] + remotes)
        out = "OK."
        color = "\033[32m" # green
    except OSError as oser:
        out = "Failed."
        color = "\033[31m" # red
    except subprocess.CalledProcessError as cper:
        out = "Failed."
        color = "\033[31m" # red
    
    report.append("%s%s: %s%s" % (color, repo, out, ORIGINAL_COLOR))

    return report

<commit_msg>now using the -C option with git<commit_after>#!/usr/bin/env python

import os
import subprocess

def do_fetch(repo, remotes):

    ORIGINAL_COLOR = "\033[0m" # mvtodo: would be better to try to detect the terminal's current standard color
    report = []

    print("\n* Fetching %s ..." % repo)
    try:
        out = subprocess.check_output(["git", "-C", repo, "fetch", "--multiple"] + remotes)
        out = "OK."
        color = "\033[32m" # green
    except OSError as oser:
        out = "Failed."
        color = "\033[31m" # red
    except subprocess.CalledProcessError as cper:
        out = "Failed."
        color = "\033[31m" # red
    
    report.append("%s%s: %s%s" % (color, repo, out, ORIGINAL_COLOR))

    return report


{'fraction_non_alphanumeric': 0.15211640211640212, 'fraction_numerical': 0.02513227513227513, 'mean_word_length': 2.526806526806527, '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': '1950554', 'n_tokens_mistral': 545, 'n_tokens_neox': 509, 'n_words': 144}