Function: magit-maybe-start-credential-cache-daemon
magit-maybe-start-credential-cache-daemon is a byte-compiled function
defined in magit-process.el.
Signature
(magit-maybe-start-credential-cache-daemon)
Documentation
Maybe start a git-credential-cache--daemon process.
If such a process is already running or if the value of option
magit-credential-cache-daemon-socket is nil, then do nothing.
Otherwise start the process passing the value of that options
as argument.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-process.el
(defun magit-maybe-start-credential-cache-daemon ()
"Maybe start a `git-credential-cache--daemon' process.
If such a process is already running or if the value of option
`magit-credential-cache-daemon-socket' is nil, then do nothing.
Otherwise start the process passing the value of that options
as argument."
(unless (or (not magit-credential-cache-daemon-socket)
(process-live-p magit-credential-cache-daemon-process)
(memq magit-credential-cache-daemon-process
(list-system-processes)))
(setq magit-credential-cache-daemon-process
(or (seq-find (lambda (process)
(let* ((attr (process-attributes process))
(comm (cdr (assq 'comm attr)))
(user (cdr (assq 'user attr))))
(and (string= comm "git-credential-cache--daemon")
(string= user user-login-name))))
(list-system-processes))
(condition-case nil
(start-process "git-credential-cache--daemon"
" *git-credential-cache--daemon*"
(magit-git-executable)
"credential-cache--daemon"
magit-credential-cache-daemon-socket)
;; Some Git implementations (e.g., Windows) won't have
;; this program; if we fail the first time, stop trying.
((debug error)
(remove-hook 'magit-credential-hook
#'magit-maybe-start-credential-cache-daemon)))))))