Function: magit-git-str

magit-git-str is a byte-compiled function defined in magit-git.el.

Signature

(magit-git-str &rest ARGS)

Documentation

Execute Git with ARGS, returning the first line of its output.

If there is no output, return nil. If the output begins with a newline, return an empty string. Like magit-git-string but ignore magit-git-debug.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-git.el
(defun magit-git-str (&rest args)
  "Execute Git with ARGS, returning the first line of its output.
If there is no output, return nil.  If the output begins with a
newline, return an empty string.  Like `magit-git-string' but
ignore `magit-git-debug'."
  (setq args (flatten-tree args))
  (magit--with-refresh-cache (cons default-directory args)
    (magit--with-temp-process-buffer
      (magit-process-git (list t nil) args)
      (unless (bobp)
        (goto-char (point-min))
        (buffer-substring-no-properties (point) (line-end-position))))))