diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 7a41df614b..fcba4136b0 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -897,6 +897,12 @@ project-prompt-project-dir (read-directory-name "Select directory: " default-directory nil t) pr-dir))) +;;;###autoload +(defun project-vc-list () + "Return a list of VC-based projects." + (project--ensure-read-project-list) + (seq-filter #'project-try-vc (mapcar #'car project--list))) + ;;; Project switching diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 08b1a85c9b..a640067de1 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2559,7 +2559,8 @@ vc-print-root-log rootdir) (if backend (setq rootdir (vc-call-backend backend 'root default-directory)) - (setq rootdir (read-directory-name "Directory for VC revision log: ")) + (setq rootdir (read-directory-name "Directory for VC revision log: " nil + (project-vc-list))) (setq backend (vc-responsible-backend rootdir)) (unless backend (error "Directory is not version controlled")))