datalad_next.runners.call_git_lines
- datalad_next.runners.call_git_lines(args: list[str], *, cwd: Path | None = None, input: str | None = None, force_c_locale: bool = False) list[str][source]
Call Git for any (small) number of lines of output
argsis a list of arguments for the Git command. This list must not contain the Git executable itself. It will be prepended (unconditionally) to the arguments before passing them on.If
cwdis not None, the function changes the working directory tocwdbefore executing the command.If
inputis not None, the argument becomes the subprocess’s stdin. This is intended for small-scale inputs. For call that require processing large inputs,iter_git_subproc()is to be preferred.If
force_c_localeisTruethe environment of the Git process is altered to ensure output according to the C locale. This is useful when output has to be processed in a locale invariant fashion.- Raises:
CommandError if the call exits with a non-zero status. --