Function: magit-run-git-hook
magit-run-git-hook is a byte-compiled function defined in
magit-git.el.
Signature
(magit-run-git-hook HOOK &rest ARGS)
Documentation
Run the Lisp HOOK with the specified arguments ARGS.
ARGS are the arguments (a possibly empty list of strings), which the Git hook was called with. HOOK is a string naming a hook.
This function is only intended to be called via "emacsclient", by an executable by the same name, which in turn is only intended to be called by Git hooks.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260822.1158/magit-git.el
;;; Git Hooks
(defun magit-run-git-hook (hook &rest args)
"Run the Lisp HOOK with the specified arguments ARGS.
ARGS are the arguments (a possibly empty list of strings), which
the Git hook was called with. HOOK is a string naming a hook.
This function is only intended to be called via \"emacsclient\", by
an executable by the same name, which in turn is only intended to
be called by Git hooks."
(setq hook (intern hook))
(when (and (boundp hook)
(symbol-value hook))
(magit--client-message "Running %s..." hook)
(advice-add 'message :override #'magit--client-message)
(unwind-protect (apply #'run-hook-with-args hook args)
(advice-remove 'message #'magit--client-message))
(magit--client-message "Running %s...done" hook))
'---) ; Emacsclient insists on printing the value.