branch: elpa/magit
commit 90561a2e856269a5499e993681ea8375de2735a8
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    magit-commit-diff: Demote errors
    
    An error while preparing the diff (e.g., due to a bug such as #5524)
    should not prevent the creation of a commit.  We already do the same
    for errors that trigger when running `git-commit-setup-hook', but
    this function is run via other hooks.
---
 lisp/magit-commit.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el
index e2c8996c6d..fb9df9c69e 100644
--- a/lisp/magit-commit.el
+++ b/lisp/magit-commit.el
@@ -677,7 +677,8 @@ an alternative implementation."
     (message "Diffing changes to be committed (C-g to abort diffing)")
     (let ((inhibit-quit nil))
       (condition-case nil
-          (magit-commit-diff-1)
+          (with-demoted-errors "Error showing commit diff: %S"
+            (magit-commit-diff-1))
         (quit)))))
 
 (defun magit-commit-diff-1 ()

Reply via email to