branch: externals/vc-jj
commit 65d068cb81c55502148c2a96d560852a6c2d50e4
Merge: fcbc1882a0 9a63ea6bb6
Author: Rudi Schlatte <r...@noreply.codeberg.org>
Commit: Rudi Schlatte <r...@noreply.codeberg.org>

    Merge pull request 'push-nnqmtkytlkpw' (#87) from push-nnqmtkytlkpw into 
master
---
 vc-jj.el | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/vc-jj.el b/vc-jj.el
index fe5e529b39..3b5d49d64a 100644
--- a/vc-jj.el
+++ b/vc-jj.el
@@ -657,17 +657,7 @@ If REV is not specified, revert the file as with 
`vc-jj-revert'."
 (defun vc-jj-root (file)
   "Return the root of the repository containing FILE.
 Return NIL if FILE is not in a jj repository."
-  ;; `default-directory' must be an absolute directory name ending
-  ;; with a slash, so we go to some lengths to guarantee this, even
-  ;; for e.g. (vc-jj-root ".")
-  (let* ((absolute-file (expand-file-name file))
-         (default-directory
-          (file-name-as-directory (if (file-directory-p absolute-file)
-                                      absolute-file
-                                    (file-name-directory absolute-file)))))
-    (with-temp-buffer
-      (when (= 0 (call-process vc-jj-program nil (list t nil) nil "root"))
-        (file-name-as-directory (buffer-substring (point-min) (1- 
(point-max))))))))
+  (vc-find-root file ".jj"))
 
 (defalias 'vc-jj-responsible-p #'vc-jj-root)
 

Reply via email to