Function: magit-call-git

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

Signature

(magit-call-git &rest ARGS)

Documentation

Call Git synchronously in a separate process.

Function magit-git-executable(var)/magit-git-executable(fun) specifies the Git executable and option magit-git-global-arguments specifies constant arguments. The arguments ARGS specify arguments to Git, they are flattened before use.

Process output goes into a new section in the buffer returned by magit-process-buffer. Return the exit code.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-process.el
(defun magit-call-git (&rest args)
  "Call Git synchronously in a separate process.

Function `magit-git-executable' specifies the Git executable and
option `magit-git-global-arguments' specifies constant arguments.
The arguments ARGS specify arguments to Git, they are flattened
before use.

Process output goes into a new section in the buffer returned by
`magit-process-buffer'.  Return the exit code."
  (run-hooks 'magit-pre-call-git-hook)
  (let ((default-process-coding-system (magit--process-coding-system)))
    (apply #'magit-call-process
           (magit-git-executable)
           (magit-process-git-arguments args))))