Function: vc-root-dir
vc-root-dir is an autoloaded and byte-compiled function defined in
vc.el.gz.
Signature
(vc-root-dir)
Documentation
Return the root directory for the current VC tree.
Return nil if the root directory cannot be identified.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
;;;###autoload
(defun vc-root-dir ()
"Return the root directory for the current VC tree.
Return nil if the root directory cannot be identified."
(let ((backend (vc-deduce-backend)))
(if 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)))))