From: Sean Whitton Date: Sat, 5 Jul 2025 08:49:13 +0000 (+0100) Subject: Don't call vc-buffer-sync-fileset when committing a patch X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=af40dbf78f8ddbe50085bf18775f3b1b88fe6e65;p=emacs.git 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) --- 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