Function: projectile-vc
projectile-vc is an autoloaded, interactive and byte-compiled function
defined in projectile.el.
Signature
(projectile-vc &optional PROJECT-ROOT)
Documentation
Open vc-dir at the root of the project.
For git projects magit-status-internal is used if available.
For hg projects monky-status is used if available.
If PROJECT-ROOT is given, it is opened instead of the project root directory of the current buffer file. If interactively called with a prefix argument, the user is prompted for a project directory to open.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
;;;###autoload
(defun projectile-vc (&optional project-root)
"Open `vc-dir' at the root of the project.
For git projects `magit-status-internal' is used if available.
For hg projects `monky-status' is used if available.
If PROJECT-ROOT is given, it is opened instead of the project
root directory of the current buffer file. If interactively
called with a prefix argument, the user is prompted for a project
directory to open."
(interactive (and current-prefix-arg
(list
(projectile-completing-read
"Open project VC in: "
projectile-known-projects
:caller 'projectile-read-project))))
(unless project-root
(setq project-root (projectile-acquire-root)))
(let ((vcs (projectile-project-vcs project-root)))
(pcase vcs
('git
(cond ((fboundp 'magit-status-internal)
(magit-status-internal project-root))
((fboundp 'magit-status)
(with-no-warnings (magit-status project-root)))
(t
(vc-dir project-root))))
('hg
(if (fboundp 'monky-status)
(monky-status project-root)
(vc-dir project-root)))
(_ (vc-dir project-root)))))