diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2026-04-01 23:21:13 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2026-04-01 23:21:13 +0200 |
| commit | 71535990381f0b12d5dc1dae0f265ce42336c4ad (patch) | |
| tree | 64fca97880a9fe4764e6b641b8cb0cc7653564b6 | |
| parent | 28878dd879aa2591b971a09848fdf800e92f3a2b (diff) | |
magit-cygwin-mount-points: Fix regression
In [1: 7fe84a4cd0] we started using the new `magit--early-process-lines'
but that did not take into account that `string-match-p' may end up with
nil as STRING, which is a type error.
Closes #5548.
| -rw-r--r-- | lisp/magit-git.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/magit-git.el b/lisp/magit-git.el index 1ce4fc2..e4b8ae0 100644 --- a/lisp/magit-git.el +++ b/lisp/magit-git.el @@ -1275,11 +1275,10 @@ or if no rename is detected." "Failed to parse Cygwin mount: %S" mount))) ;; If --exec-path is not a native Windows path, ;; then we probably have a cygwin git. - (and (not (string-match-p - "\\`[a-zA-Z]:" - (car (magit--early-process-lines - magit-git-executable "--exec-path")))) - (magit--early-process-lines "mount"))) + (and-let ((dirs (magit--early-process-lines + magit-git-executable "--exec-path"))) + (and (not (string-match-p "\\`[a-zA-Z]:" (car dir))) + (magit--early-process-lines "mount")))) #'> :key (pcase-lambda (`(,cyg . ,_win)) (length cyg)))) "Alist of (CYGWIN . WIN32) directory names. Sorted from longest to shortest CYGWIN name." |
