datalad_next.runners.call_git_oneline
- datalad_next.runners.call_git_oneline(args: list[str], *, cwd: Path | None = None, input: str | None = None, force_c_locale: bool = False) str[source]
Call Git for a single line of output
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. --
AssertionError if there is more than one line of output. --