<commit_before>import os
import subprocess
import re
from utils import *
from method_missing import MethodMissingMixin

class Git(MethodMissingMixin):
    """
    The Git class manages communication with the Git binary
    """
    def __init__(self, git_dir):
        super(Git, self).__init__()
        self.git_dir = git_dir

    @property
    def get_dir(self):
        return self.git_dir

    def execute(self, command):
        """
        Handles executing the command on the shell and consumes and returns
        the returned information (stdout)

        ``command``
            The command to execute
        """
        print ' '.join(command)
        proc = subprocess.Popen(command,
                                cwd = self.git_dir,
                                stdout=subprocess.PIPE
                                )
        proc.wait()<commit_msg>git.py: add support for a GIT_PYTHON_TRACE environment variable<commit_after>import os
import subprocess
import re
from utils import *
from method_missing import MethodMissingMixin

# Enables debugging of GitPython's git commands
GIT_PYTHON_TRACE = os.environ.get("GIT_PYTHON_TRACE", False)

class Git(MethodMissingMixin):
    """
    The Git class manages communication with the Git binary
    """
    def __init__(self, git_dir):
        super(Git, self).__init__()
        self.git_dir = git_dir

    @property
    def get_dir(self):
        return self.git_dir

    def execute(self, command):
        """
        Handles executing the command on the shell and consumes and returns
        the returned information (stdout)

        ``command``
            The command to execute
        """

        if GIT_PYTHON_TRACE:
            print command

        proc = subprocess.Popen(command,
                                cwd = self.git_dir,
                                stdout=subprocess.PIPE
                                )
        proc.wait()
{'fraction_non_alphanumeric': 0.07072282891315652, 'fraction_numerical': 0.0, 'mean_word_length': 1.9107413010590015, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5485248', 'n_tokens_mistral': 523, 'n_tokens_neox': 500, 'n_words': 151}