From 5bc33dcc441b839e2c0dbdb4453aee41ba5bc991 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 23 Jan 2021 09:30:46 -0800 Subject: [PATCH] =?UTF-8?q?Fix=20usage=20of=20=E2=80=98alist-get=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By default ‘alist-get’ uses ‘eq’ to compare keys, which doesn’t work for strings reliably (I’m actually surprised it works at all). --- vc-p4.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vc-p4.el b/vc-p4.el index 7ccddab..73e17e9 100644 --- a/vc-p4.el +++ b/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." (let* ((default-directory (file-name-directory file)) (info (p4-lowlevel-info)) - (root (alist-get "Client root" info)) - (cwd (alist-get "Current directory" info))) + (root (alist-get "Client root" info nil nil #'string=)) + (cwd (alist-get "Current directory" info nil nil #'string=))) (string-prefix-p root cwd))) (defun vc-p4-has-unresolved-conflicts-p (file)