# Path: git_trac/git_error.py
# class GitError(RuntimeError):
#     r"""
#     Error raised when git exits with a non-zero exit code.
# 
#     EXAMPLES::
# 
#         sage: from git_trac.git_error import GitError
#         sage: raise GitError({'exit_code':128, 'stdout':'', 'stderr':'', 'cmd':'command'})
#         Traceback (most recent call last):
#         ...
#         GitError: git returned with 
#         non-zero exit code (128) when executing "command"
#     """
#     def __init__(self, result, explain=None, advice=None):
#         r"""
#         Initialization.
# 
#         TESTS::
# 
#             sage: from git_trac.git_error import GitError
#             sage: type(GitError({'exit_code':128, 'stdout':'', 'stderr':'', 'cmd':'command'}))
#             <class 'git_trac.git_error.GitError'>
#         """
#         self.exit_code = result['exit_code']
#         self.cmd = result['cmd'].strip()
#         def prefix(string, prefix):
#             return '\n'.join([prefix + ': ' + line.rstrip() for line in string.splitlines()])
#         self.stdout = prefix(result['stdout'], '    STDOUT')
#         self.stderr = prefix(result['stderr'], '    STDERR')
#         self.explain = explain
#         self.advice = advice
#         template = 'git returned with non-zero exit code ({0}) when executing "{1}"'
#         msg = template.format(self.exit_code, self.cmd)
#         if len(self.stdout) != 0:
#             msg += '\n' + self.stdout
#         if len(self.stderr) != 0:
#             msg += '\n' + self.stderr
#         RuntimeError.__init__(self, msg)
# 
# Path: git_trac/logger.py
# def make_logger(name, doctest_mode=False):
# def enable_doctest_mode():


import os
import subprocess
from .git_error import GitError
from .logger import logger
        self._user_email_set = False
        self.silent = GitInterfaceSilentProxy(self)
        self.exit_code = GitInterfaceExitCodeProxy(self)
        self.echo = GitInterfacePrintProxy(self)

    @property
    def git_cmd(self):
        """
        The git executable
        
        EXAMPLES::

            sage: git.git_cmd
            'git'
        """
        return self._git_cmd

    def __repr__(self):
        r"""
        Return a printable representation of this object.
        
        TESTS::

            sage: repr(git)
            'Interface to git repo'
        """
        return 'Interface to git repo'

    def _log(self, prefix, log):
        for line in log.splitlines():

# Path: git_trac/git_error.py
# class GitError(RuntimeError):
#     r"""
#     Error raised when git exits with a non-zero exit code.
# 
#     EXAMPLES::
# 
#         sage: from git_trac.git_error import GitError
#         sage: raise GitError({'exit_code':128, 'stdout':'', 'stderr':'', 'cmd':'command'})
#         Traceback (most recent call last):
#         ...
#         GitError: git returned with 
#         non-zero exit code (128) when executing "command"
#     """
#     def __init__(self, result, explain=None, advice=None):
#         r"""
#         Initialization.
# 
#         TESTS::
# 
#             sage: from git_trac.git_error import GitError
#             sage: type(GitError({'exit_code':128, 'stdout':'', 'stderr':'', 'cmd':'command'}))
#             <class 'git_trac.git_error.GitError'>
#         """
#         self.exit_code = result['exit_code']
#         self.cmd = result['cmd'].strip()
#         def prefix(string, prefix):
#             return '\n'.join([prefix + ': ' + line.rstrip() for line in string.splitlines()])
#         self.stdout = prefix(result['stdout'], '    STDOUT')
#         self.stderr = prefix(result['stderr'], '    STDERR')
#         self.explain = explain
#         self.advice = advice
#         template = 'git returned with non-zero exit code ({0}) when executing "{1}"'
#         msg = template.format(self.exit_code, self.cmd)
#         if len(self.stdout) != 0:
#             msg += '\n' + self.stdout
#         if len(self.stderr) != 0:
#             msg += '\n' + self.stderr
#         RuntimeError.__init__(self, msg)
# 
# Path: git_trac/logger.py
# def make_logger(name, doctest_mode=False):
# def enable_doctest_mode():


# Path: git_trac/git_interface.py
import os
import subprocess
from .git_error import GitError
from .logger import logger

        self._user_email_set = False
        self.silent = GitInterfaceSilentProxy(self)
        self.exit_code = GitInterfaceExitCodeProxy(self)
        self.echo = GitInterfacePrintProxy(self)

    @property
    def git_cmd(self):
        """
        The git executable
        
        EXAMPLES::

            sage: git.git_cmd
            'git'
        """
        return self._git_cmd

    def __repr__(self):
        r"""
        Return a printable representation of this object.
        
        TESTS::

            sage: repr(git)
            'Interface to git repo'
        """
        return 'Interface to git repo'

    def _log(self, prefix, log):
        for line in log.splitlines():

            logger.debug('%s = %s', prefix, line)