From 677d62093056e93163c97e675ae83c833443de42 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 5 Oct 2019 12:32:11 +0300 Subject: [PATCH] (project--vc-list-files): Make sure to expand file names * lisp/progmodes/project.el (project--vc-list-files): Make sure to expand file names. Turns out, Grep doesn't like abbreviated ones. --- lisp/progmodes/project.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index ef2499030a7..c7807f39447 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -302,7 +302,7 @@ backend implementation of `project-external-roots'.") (defun project--vc-list-files (dir backend extra-ignores) (pcase backend (`Git - (let ((default-directory (file-name-as-directory dir)) + (let ((default-directory (expand-file-name (file-name-as-directory dir))) (args '("-z"))) ;; Include unregistered. (setq args (append args '("-c" "-o" "--exclude-standard"))) @@ -316,12 +316,12 @@ backend implementation of `project-external-roots'.") (format ":!:%s" i))) extra-ignores))))) (mapcar - (lambda (file) (concat dir file)) + (lambda (file) (concat default-directory file)) (split-string (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t)))) (`Hg - (let ((default-directory (file-name-as-directory dir)) + (let ((default-directory (expand-file-name (file-name-as-directory dir))) args) ;; Include unregistered. (setq args (nconc args '("-mcardu" "--no-status" "-0"))) @@ -334,7 +334,7 @@ backend implementation of `project-external-roots'.") (with-temp-buffer (apply #'vc-hg-command t 0 "." "status" args) (mapcar - (lambda (s) (concat dir s)) + (lambda (s) (concat default-directory s)) (split-string (buffer-string) "\0" t))))))) (cl-defmethod project-ignores ((project (head vc)) dir) -- 2.39.5