branch: elpa/magit
commit 874fb0fede8ecde48fc97d4218f03e523c699baf
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    magit--git-insert: When debugging always log errors
    
    Don't forgo doing so when the return-error argument is non-nil as well.
    When that is the case, that does not somehow cancel out the fact that
    the user has requested that more error messages shall be displayed and
    recorded in the process buffer.
---
 lisp/magit-git.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index c66a1cd03de..ed33e9c9739 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -485,14 +485,14 @@ add a section in the respective process buffer."
                           (if (functionp magit-git-debug)
                               (funcall magit-git-debug (buffer-string))
                             (magit--locate-error-message))))
-                  (unless return-error
+                  (when magit-git-debug
                     (let ((magit-git-debug nil))
                       (with-current-buffer (magit-process-buffer t)
                         (magit-process-insert-section
                          default-directory magit-git-executable
                          (magit-process-git-arguments args)
                          exit log)))))
-                (unless return-error
+                (when magit-git-debug
                   (if errmsg
                       (message "%s" errmsg)
                     (message "Git returned with exit-code %s" exit))))

Reply via email to