emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 677d620: (project--vc-list-files): Make sure to exp


From: Dmitry Gutov
Subject: [Emacs-diffs] master 677d620: (project--vc-list-files): Make sure to expand file names
Date: Sat, 5 Oct 2019 05:33:40 -0400 (EDT)

branch: master
commit 677d62093056e93163c97e675ae83c833443de42
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    (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 ef24990..c7807f3 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]