code: def git_lines(*args, git=maybeloggit, **kwargs):
      'Generator of stdout lines from given git command'
      err = io.StringIO()
      try:
          for line in git('--no-pager', _err=err, *args, _decode_errors='replace', _iter=True, _bg_exc=False, **kwargs):
              yield line[:-1]  # remove EOL
      except sh.ErrorReturnCode as e:
          status('exit_code=%s' % e.exit_code)
  
      errlines = err.getvalue().splitlines()
      if len(errlines) < 3:
          for line in errlines:
              status(line)
      else:
          vd().push(TextSheet('git ' + ' '.join(args), errlines)f git_lines(*args, git=maybeloggit, **kwargs):
      'Generator of stdout lines from given git command'
      err = io.StringIO()
      try:
          for line in git('--no-pager', _err=err, *args, _decode_errors='replace', _iter=True, _bg_exc=False, **kwargs):
              yield line[:-1]  # remove EOL
      except sh.ErrorReturnCode as e:
          status('exit_code=%s' % e.exit_code)
  
      errlines = err.getvalue().splitlines()
      if len(errlines) < 3:
          for line in errlines:
              status(line)
      else:
          vd().push(TextSheet('git ' + ' '.join(args), errlines))
docs: Generator of stdout lines from given git command