]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't call vc-buffer-sync-fileset when committing a patch
authorSean Whitton <spwhitton@spwhitton.name>
Sat, 5 Jul 2025 08:49:13 +0000 (09:49 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 23 Jul 2025 20:20:29 +0000 (22:20 +0200)
* 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
lisp/vc/vc.el

index 286d6bb82da4d6dc7b8a77d45322fbf0e3743927..dc068adf5ff295ba112c4c6cfe32f3c41f10a837 100644 (file)
@@ -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"))
 
index 883aabac95621c297c33773ec32aaae0f68ea2ca..cee726312fd9d524041fa6b418095e0d393071d2 100644 (file)
@@ -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