Commit 4b15d582 authored by Radon Rosborough's avatar Radon Rosborough Committed by Jonas Bernoulli

Handle empty credential.helper value

It is an intended use case for Git to override previously specified
credential.helper values by providing an empty string as a new value.
Fix the definition of `magit-credential-cache-daemon-socket' so that
it handles this case, instead of throwing an error.
parent dba946da
......@@ -101,8 +101,9 @@ When this is nil, no sections are ever removed."
(defcustom magit-credential-cache-daemon-socket
(--some (-let [(prog . args) (split-string it)]
(if (string-match-p
"\\`\\(?:\\(?:/.*/\\)?git-credential-\\)?cache\\'" prog)
(if (and prog
"\\`\\(?:\\(?:/.*/\\)?git-credential-\\)?cache\\'" prog))
(or (cl-loop for (opt val) on args
if (string= opt "--socket")
return val)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment