docs: def run_git(self, args, git_env=None):
          '''
          Runs the git executable with the arguments given and returns a list of
          lines produced on its standard output.
          '''
  
          popen_kwargs = {
              'stdout': subprocess.PIPE,
              'stderr': subprocess.PIPE,
          }
  
          if git_env:
              popen_kwargs['env'] = git_env
  
          if self._git_toplevel:
              popen_kwargs['cwd'] = self._git_toplevel
  
          git_process = subprocess.Popen(
              [GitRunner._git_executable] + args,
              **popen_kwargs
          )
  
          try:
              out, err = git_process.communicate()
              git_process.wait()
          except Exception as e:
              raise GitError("Couldn't run 'git {args}':{newline}{ex}".format(
                  args=' '.join(args),
                  newline=os.linesep,
                  ex=str(e)
              ))
  
          if (0 != git_process.returncode) or err:
              if err:
                  err = err.decode('utf_8')
              raise GitError("'git {args}' failed with:{newline}{err}".format(
                  args=' '.join(args),
                  newline=os.linesep,
                  err=err
              ))
  
          if not out:
              raise ValueError("No output")
  
          return out.decode('utf_8').splitlines()