From 2d119c756b44b35c902c87a99eb1029e53b5b06d Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 12 Jun 2025 11:14:49 +0100 Subject: [PATCH] log-edit-diff-fileset: Pass NOT-ESSENTIAL non-nil to vc-diff * 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 7f02e61787a..bd62e7889e8 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -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." -- 2.39.5