Fix usage of ‘alist-get’

By default ‘alist-get’ uses ‘eq’ to compare keys, which doesn’t work for strings
reliably (I’m actually surprised it works at all).
This commit is contained in:
Tom Willemse 2021-01-23 09:30:46 -08:00
parent a535c47e93
commit 5bc33dcc44

View file

@ -914,8 +914,8 @@ If DIRNAME is not specified, uses `default-directory'."
"Return true if FILE is inside the p4 client hierarchy." "Return true if FILE is inside the p4 client hierarchy."
(let* ((default-directory (file-name-directory file)) (let* ((default-directory (file-name-directory file))
(info (p4-lowlevel-info)) (info (p4-lowlevel-info))
(root (alist-get "Client root" info)) (root (alist-get "Client root" info nil nil #'string=))
(cwd (alist-get "Current directory" info))) (cwd (alist-get "Current directory" info nil nil #'string=)))
(string-prefix-p root cwd))) (string-prefix-p root cwd)))
(defun vc-p4-has-unresolved-conflicts-p (file) (defun vc-p4-has-unresolved-conflicts-p (file)