class_docstr: Representation of a Git repository
  
      
docstr: Call git and return standard output.
  
  Parameters
  ----------
  args : list of str
    Arguments to pass to `git`.
  files : list of str, optional
    File arguments to pass to `git`. The advantage of passing these here
    rather than as part of `args` is that the call will be split into
    multiple calls to avoid exceeding the maximum command line length.
  expect_stderr : bool, optional
    Standard error is expected and should not be elevated above the DEBUG
    level.
  expect_fail : bool, optional
    A non-zero exit is expected and should not be elevated above the
    DEBUG level.
  pathspec_from_file : bool, optional
    Could be set to True for a `git` command which supports
    --pathspec-from-file and --pathspec-file-nul options. Then pathspecs
    would be passed through a temporary file.
  read_only : bool, optional
    By setting this to True, the caller indicates that the command does
    not write to the repository, which lets this function skip some
    operations that are necessary only for commands the modify the
    repository. Beware that even commands that are conceptually
    read-only, such as `git-status` and `git-diff`, may refresh and write
    the index.
  
  Returns
  -------
  standard output (str)
  
  Raises
  ------
  CommandError if the call exits with a non-zero status.
docstr_tok: ["Call","git","and","return","standard","output",".","Parameters","--","--","--","--","--","args",":","list","of","str","Arguments","to","pass","to","`","git","`",".","files",":","list","of","str",",","optional","File","arguments","to","pass","to","`","git","`",".","The","advantage","of","passing","these","here","rather","than","as","part","of","`","args","`","is","that","the","call","will","be","split","into","multiple","calls","to","avoid","exceeding","the","maximum","command","line","length",".","expect_stderr",":","bool",",","optional","Standard","error","is","expected","and","should","not","be","elevated","above","the","DEBUG","level",".","expect_fail",":","bool",",","optional","A","non-zero","exit","is","expected","and","should","not","be","elevated","above","the","DEBUG","level",".","pathspec_from_file",":","bool",",","optional","Could","be","set","to","True","for","a","`","git","`","command","which","supports","--","pathspec-from-file","and","--","pathspec-file-nul","options",".","Then","pathspecs","would","be","passed","through","a","temporary","file",".","read_only",":","bool",",","optional","By","setting","this","to","True",",","the","caller","indicates","that","the","command","does","not","write","to","the","repository",",","which","lets","this","function","skip","some","operations","that","are","necessary","only","for","commands","the","modify","the","repository",".","Beware","that","even","commands","that","are","conceptually","read-only",",","such","as","`","git-status","`","and","`","git-diff","`",",","may","refresh","and","write","the","index",".","Returns","--","--","--","-","standard","output","(","str",")","Raises","--","--","--","CommandError","if","the","call","exits","with","a","non-zero","status","."]
code: def call_git(
      self,
      args,
      files=None,
      expect_stderr=False,
      expect_fail=False,
      env=None,
      pathspec_from_file: Optional[bool] = False,
      read_only=False,
  ):
      """Call git and return standard output.
  
      Parameters
      ----------
      args : list of str
        Arguments to pass to `git`.
      files : list of str, optional
        File arguments to pass to `git`. The advantage of passing these here
        rather than as part of `args` is that the call will be split into
        multiple calls to avoid exceeding the maximum command line length.
      expect_stderr : bool, optional
        Standard error is expected and should not be elevated above the DEBUG
        level.
      expect_fail : bool, optional
        A non-zero exit is expected and should not be elevated above the
        DEBUG level.
      pathspec_from_file : bool, optional
        Could be set to True for a `git` command which supports
        --pathspec-from-file and --pathspec-file-nul options. Then pathspecs
        would be passed through a temporary file.
      read_only : bool, optional
        By setting this to True, the caller indicates that the command does
        not write to the repository, which lets this function skip some
        operations that are necessary only for commands the modify the
        repository. Beware that even commands that are conceptually
        read-only, such as `git-status` and `git-diff`, may refresh and write
        the index.
  
      Returns
      -------
      standard output (str)
  
      Raises
      ------
      CommandError if the call exits with a non-zero status.
      """
      return "".join(
          self.call_git_items_(
              args,
              files,
              expect_stderr=expect_stderr,
              expect_fail=expect_fail,
              env=env,
              pathspec_from_file=pathspec_from_file,
              read_only=read_only,
              keep_ends=True,
          )
      )
  
imports: import logging
  import re
  import threading
  import time
  from contextlib import contextmanager
  from locale import getpreferredencoding
  from os import environ
  from os.path import lexists
  from typing import Optional
  from weakref import finalize, WeakValueDictionary
  from datalad.cmd import GitWitlessRunner, StdOutErrCapture
  from datalad.config import ConfigManager
  from datalad.dataset.repo import PathBasedFlyweight, RepoInterface, path_based_str_repr
  from datalad.runner.nonasyncrunner import STDERR_FILENO, STDOUT_FILENO
  from datalad.runner.protocol import GeneratorMixIn
  from datalad.runner.utils import AssemblingDecoderMixIn, LineSplitter
  from datalad.support.exceptions import CommandError, GitIgnoreError, InvalidGitRepositoryError, PathKnownToRepositoryError
  from datalad.utils import ensure_list, lock_if_required, Path
label_desc: Use image node_id 13 for calling the GitRepo obj's underlying member method code with example usage: obj.call_git(args, files, expect_stderr, expect_fail, env, pathspec_from_file, read_only) and returns: str