parameters: (directory, command)
docstring: Launches git subcommand.
  
    Errors are swallowed.
  
    Returns:
      A process object or None.
docstring_summary: Launches git subcommand.
docstring_tokens: Launches git subcommand .
function: def RunGitCommand(directory, command):
    """
    Launches git subcommand.
  
    Errors are swallowed.
  
    Returns:
      A process object or None.
    """
    command = ['git'] + command
    # Force shell usage under cygwin. This is a workaround for
    # mysterious loss of cwd while invoking cygwin's git.
    # We can't just pass shell=True to Popen, as under win32 this will
    # cause CMD to be used, while we explicitly want a cygwin shell.
    if sys.platform == 'cygwin':
      command = ['sh', '-c', ' '.join(command)]
    try:
      proc = subprocess.Popen(command,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE,
                              cwd=directory,
                              shell=(sys.platform=='win32'))
      return proc
    except OSError:
      return None
function_tokens: def RunGitCommand ( directory , command ) : command = [ 'git' ] + command # Force shell usage under cygwin. This is a workaround for # mysterious loss of cwd while invoking cygwin's git. # We can't just pass shell=True to Popen, as under win32 this will # cause CMD to be used, while we explicitly want a cygwin shell. if sys . platform == 'cygwin' : command = [ 'sh' , '-c' , ' ' . join ( command ) ] try : proc = subprocess . Popen ( command , stdout = subprocess . PIPE , stderr = subprocess . PIPE , cwd = directory , shell = ( sys . platform == 'win32' ) ) return proc except OSError : return None