tom/git.py
def run_command(self, *command, **kwargs):
        """Runs a git command against git repo.
        Syntaxically this function tries to be as close to subprocess.run
        as possible, just adding 'git' with some extra parameters in the beginning
        """
        git_command = [
            'git', '-C', self.dirname, '-c', 'user.name=' + self.username, '-c',
            'user.email=' + self.usermail, '-c', 'push.default=simple'
        ]
        git_command.extend(command)
        if 'check' not in kwargs:
            kwargs['check'] = True
        if 'capture_output' in kwargs:
            kwargs['stdout'] = subprocess.PIPE
            kwargs['stderr'] = subprocess.PIPE
            del kwargs['capture_output']
        if command[0] == 'clone':
            # we can't `cd` to target folder when it does not exist yet,
            # so delete `-C self.dirname` arguments from git command line
            del git_command[1]
            del git_command[1]
        kwargs['universal_newlines'] = True
        log.debug('running command: {}'.format(' '.join(git_command)))
        return subprocess.run(git_command, **kwargs)
Runs a git command against git repo.
        Syntaxically this function tries to be as close to subprocess.run
        as possible, just adding 'git' with some extra parameters in the beginning
        
Runs a git command against git repo.
Syntaxically this function tries to be as close to subprocess.run
as possible, just adding 'git' with some extra parameters in the beginning
Runs a git command against git repo . Syntaxically this function tries to be as close to subprocess . run as possible just adding ' git ' with some extra parameters in the beginning
def run_command(self, *command, **kwargs):
        git_command = [
            'git', '-C', self.dirname, '-c', 'user.name=' + self.username, '-c',
            'user.email=' + self.usermail, '-c', 'push.default=simple'
        ]
        git_command.extend(command)
        if 'check' not in kwargs:
            kwargs['check'] = True
        if 'capture_output' in kwargs:
            kwargs['stdout'] = subprocess.PIPE
            kwargs['stderr'] = subprocess.PIPE
            del kwargs['capture_output']
        if command[0] == 'clone':
            del git_command[1]
            del git_command[1]
        kwargs['universal_newlines'] = True
        log.debug('running command: {}'.format(' '.join(git_command)))
        return subprocess.run(git_command, **kwargs)
def run_command ( self , * command , ** kwargs ) : git_command = [ 'git' , '-C' , self . dirname , '-c' , 'user.name=' + self . username , '-c' , 'user.email=' + self . usermail , '-c' , 'push.default=simple' ] git_command . extend ( command ) if 'check' not in kwargs : kwargs [ 'check' ] = True if 'capture_output' in kwargs : kwargs [ 'stdout' ] = subprocess . PIPE kwargs [ 'stderr' ] = subprocess . PIPE del kwargs [ 'capture_output' ] if command [ 0 ] == 'clone' : del git_command [ 1 ] del git_command [ 1 ] kwargs [ 'universal_newlines' ] = True log . debug ( 'running command: {}' . format ( ' ' . join ( git_command ) ) ) return subprocess . run ( git_command , ** kwargs )
Runs a git command against git repo.
Runs a git command against git repo .
"""Runs a git command against git repo.
        Syntaxically this function tries to be as close to subprocess.run
        as possible, just adding 'git' with some extra parameters in the beginning
        """ # we can't `cd` to target folder when it does not exist yet, # so delete `-C self.dirname` arguments from git command line
self