From: Sean Whitton Date: Thu, 12 Jun 2025 10:15:56 +0000 (+0100) Subject: vc-finish-logentry: Fix syncing buffers: include whole fileset X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2ebe7d33606578fc2c3dbf594e449fb6c3bc79fe;p=emacs.git vc-finish-logentry: Fix syncing buffers: include whole fileset * lisp/vc/vc-dispatcher.el (log-edit-vc-backend) (vc-buffer-sync-fileset): Declare. (vc-finish-logentry): Call vc-buffer-sync-fileset instead of just vc-buffer-sync. (cherry picked from commit 651d4b11bcf227cd2f33bca0af5a5710101e9b39) --- diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 5cc2dd9ade9..17d73ca4977 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -847,6 +847,9 @@ DIFF-FUNCTION is `log-edit-diff-function' for the Log Edit buffer." msg) (vc-finish-logentry (eq comment t))))) +(defvar log-edit-vc-backend) +(declare-function vc-buffer-sync-fileset "vc") + ;; vc-finish-logentry is typically called from a log-edit buffer (see ;; vc-start-logentry). (defun vc-finish-logentry (&optional nocomment) @@ -858,10 +861,9 @@ the buffer contents as a comment." ;; Check and record the comment, if any. (unless nocomment (run-hooks 'vc-logentry-check-hook)) - ;; Sync parent buffer in case the user modified it while editing the comment. - ;; But not if it is a vc-dir buffer. - (with-current-buffer vc-parent-buffer - (or (vc-dispatcher-browsing) (vc-buffer-sync))) + ;; Must pass NOT-ESSENTIAL 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"))