]> git.eshelyaron.com Git - emacs.git/commitdiff
log-edit-diff-fileset: Pass NOT-ESSENTIAL non-nil to vc-diff
authorSean Whitton <spwhitton@spwhitton.name>
Thu, 12 Jun 2025 10:14:49 +0000 (11:14 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 18 Jun 2025 08:12:06 +0000 (10:12 +0200)
* lisp/vc/log-edit.el (log-edit-diff-fileset): Pass
NOT-ESSENTIAL non-nil to vc-diff.

(cherry picked from commit 28f40f79974245f6b144d09cc3df91c171834bf9)

lisp/vc/log-edit.el

index 7f02e61787a28a136c84430be5999a6c6f23ddb4..bd62e7889e8233a14286acc060895984747318d4 100644 (file)
@@ -858,7 +858,12 @@ comment history, see `log-edit-comment-ring', and hides `log-edit-files-buf'."
 (defun log-edit-diff-fileset ()
   "Display diffs for the files to be committed."
   (interactive)
-  (vc-diff nil nil (list log-edit-vc-backend vc-log-fileset)))
+  ;; Re NOT-ESSENTIAL non-nil: this function can get called from
+  ;; `log-edit-hook' and we don't want to abort the whole Log Edit setup
+  ;; because the user says no to saving a buffer.  The buffers will
+  ;; still actually get saved before committing by `vc-finish-logentry'.
+  ;; Possibly `log-edit-maybe-show-diff' should catch the error instead.
+  (vc-diff nil 'not-essential (list log-edit-vc-backend vc-log-fileset)))
 
 (defun log-edit-show-diff ()
   "Show diff for the changes to be committed."