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:
parent
a535c47e93
commit
5bc33dcc44
1 changed files with 2 additions and 2 deletions
4
vc-p4.el
4
vc-p4.el
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue