Function: vc-root-dir
vc-root-dir is an autoloaded and byte-compiled function defined in
vc.el.gz.
Signature
(vc-root-dir &optional BACKEND)
Documentation
Return the root directory for the current VC tree.
Return nil if the root directory cannot be identified. BACKEND is the VC backend.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
;;;###autoload
(defun vc-root-dir (&optional backend)
"Return the root directory for the current VC tree.
Return nil if the root directory cannot be identified.
BACKEND is the VC backend."
(and-let* ((backend (or backend (vc-deduce-backend))))
(condition-case err
(vc-call-backend backend 'root default-directory)
(vc-not-supported
(unless (eq (cadr err) 'root)
(signal (car err) (cdr err)))
nil))))