Function: magit-run-git-hook
magit-run-git-hook is a byte-compiled function defined in
magit-git.el.
Signature
(magit-run-git-hook GITHOOK &rest ARGS)
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-git.el
;;; Git Hooks
(defun magit-run-git-hook (githook &rest args)
(dolist (githook (ensure-list githook))
(let* ((githook (symbol-name githook))
(hook (save-match-data
(if (string-match "\\`common-" githook)
(intern (format "magit-common-git-%s-functions"
(substring githook (match-end 0))))
(intern (format "magit-git-%s-functions" githook))))))
(when (and (boundp hook)
(symbol-value hook))
(magit--client-message "Running %s..." hook)
(apply #'run-hook-with-args hook args)
(magit--client-message "Running %s...done" hook))))
;; Emacsclient prints the returned value to stdout. We cannot prevent
;; that, but we can use something that looks like we actually *wanted*
;; to print (which we don't).
'---)