From f6f87917fc5eb151aff0facc390983012644a681 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Sat, 25 Sep 2021 03:38:43 +0200 Subject: [PATCH] Make 'C-u C-x v v' handle unregistered files. * lisp/vc/vc.el (vc-next-action): Make 'C-u C-x v v' handle unregistered files (bug#50602). --- lisp/vc/vc.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 87679691637..7d3b0f56f60 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1216,7 +1216,11 @@ For old-style locking-based version control systems, like RCS: ((eq state 'ignored) (error "Fileset files are ignored by the version-control system")) ((or (null state) (eq state 'unregistered)) - (vc-register vc-fileset)) + (cond (verbose + (let ((backend (vc-read-backend "Backend to register to: "))) + (vc-register (cons backend (cdr vc-fileset))))) + (t + (vc-register vc-fileset)))) ;; Files are up-to-date, or need a merge and user specified a revision ((or (eq state 'up-to-date) (and verbose (eq state 'needs-update))) (cond -- 2.39.2