Function: project-try-vc

project-try-vc is a byte-compiled function defined in project.el.gz.

Signature

(project-try-vc DIR)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
;; FIXME: Should perhaps use `vc--repo-*prop' functions
;;        (after promoting those to public).  --spwhitton
(defun project-try-vc (dir)
  ;; FIXME: Learn to invalidate when the value changes:
  ;; `project-vc-merge-submodules' or `project-vc-extra-root-markers'.
  (or (vc-file-getprop dir 'project-vc)
      ;; FIXME: Cache for a shorter time.
      (let ((res (project-try-vc--search dir)))
        (and res (vc-file-setprop dir 'project-vc res))
        res)))