branch: externals/vc-jj
commit 885ddb24aebddfb4eaf76f5b3f3b6d62397ec321
Author: Rudi Schlatte <r...@constantly.at>
Commit: Rudi Schlatte <r...@constantly.at>

    Consider project-files-relative-names in project-files
---
 project-jj.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/project-jj.el b/project-jj.el
index aa1be2021a..e6d1df1496 100644
--- a/project-jj.el
+++ b/project-jj.el
@@ -35,9 +35,13 @@
   ;; get passed absolute filenames in DIRS and must return absolute
   ;; (tilde-expanded) filenames.
   (let* ((default-directory (expand-file-name (project-root project)))
-         (args (cons "--" (mapcar #'file-relative-name dirs))))
-    (mapcar #'expand-file-name
-            (apply #'process-lines "jj" "file" "list" args))))
+         (args (cons "--" (mapcar #'file-relative-name dirs)))
+         (absolutify (or (not project-files-relative-names)
+                         (> (length dirs) 1)))
+         (files (apply #'process-lines "jj" "file" "list" args)))
+    (if absolutify
+        (mapcar #'expand-file-name files)
+      files)))
 
 (defun project-try-jj (dir)
   (when-let* ((root (locate-dominating-file dir ".jj")))

Reply via email to