branch: externals/vc-jj
commit 643c05bf6a95b1e1f214e5f3374523fa268622d1
Author: Kristoffer Balintona <[email protected]>
Commit: Kristoffer Balintona <[email protected]>
Return only absolute file paths in our `project-files`
`project-files-relative-names` explains that we may return relative
file paths only optionally; it is not required. Vc-jj already
unconditionally uses absolute file paths elsewhere, so we can safely
avoid computing relative file paths here.
---
project-jj.el | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/project-jj.el b/project-jj.el
index 2b9f4212f1..c113309389 100644
--- a/project-jj.el
+++ b/project-jj.el
@@ -36,18 +36,10 @@
;; Therefore, we wrap the primary method with an :around method and
;; selectively override its behavior when the VC backend is JJ.
(if (eq (cadr project) 'JJ)
- ;; There is a bit of filename frobbing going on in this method.
- ;; The reason is that while jj reads and writes relative
- ;; filenames, we 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)))
- (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))
+ (mapcar #'expand-file-name files))
(cl-call-next-method)))
;;;###autoload