From af40dbf78f8ddbe50085bf18775f3b1b88fe6e65 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 5 Jul 2025 09:49:13 +0100 Subject: [PATCH] Don't call vc-buffer-sync-fileset when committing a patch * lisp/vc/vc-dispatcher.el (vc-finish-logentry): Move call to vc-buffer-sync-fileset from here ... * lisp/vc/vc.el (vc-checkin): ... to here, and conditionalize so as not to call when committing a patch. Also fix comment. (cherry picked from commit 45d148680367b73fc19d511b4abe5a4bb961ebc2) --- lisp/vc/vc-dispatcher.el | 3 --- lisp/vc/vc.el | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 286d6bb82da..dc068adf5ff 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -858,9 +858,6 @@ the buffer contents as a comment." ;; Check and record the comment, if any. (unless nocomment (run-hooks 'vc-logentry-check-hook)) - ;; Must pass NOT-ESSENTIAL non-nil because we later call - ;; `vc-resynch-buffer' with NOQUERY non-nil. - (vc-buffer-sync-fileset (list log-edit-vc-backend vc-log-fileset)) (unless vc-log-operation (error "No log operation is pending")) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 883aabac956..cee726312fd 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1952,6 +1952,11 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." ;; RCS 5.7 gripes about whitespace-only comments too. (unless (and comment (string-match "[^\t\n ]" comment)) (setq comment "*** empty log message ***")) + (unless patch-string + ;; Must not pass non-nil NOT-ESSENTIAL because we will shortly + ;; call (in `vc-finish-logentry') `vc-resynch-buffer' with its + ;; NOQUERY parameter non-nil. + (vc-buffer-sync-fileset (list backend files))) (when register (vc-register (list backend register))) (cl-labels ((do-it () ;; We used to change buffers to get local value of -- 2.39.5