branch: elpa/magit
commit b11524120e880be8c170dbd5a1123955d8629739
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit--git-insert: Optionally always log to process buffer
For now this is not publicly advertised, because it overlaps with
`magit-process-extreme-logging, which should be addressed before
this new variant is documented.
---
lisp/magit-git.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 1e7c8326720..50b82a3e4e4 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -478,7 +478,7 @@ insert the run command and stderr into the process buffer."
(setq log (make-temp-file "magit-stderr"))
(delete-file log)
(setq exit (magit-process-git (list t log) args))
- (when (> exit 0)
+ (when (or (> exit 0) (eq magit-git-debug 'all))
(when (file-exists-p log)
(with-temp-buffer
(insert-file-contents log)
@@ -496,10 +496,10 @@ insert the run command and stderr into the process
buffer."
(magit-process-git-arguments args)
exit log)
exit)))))
- (when magit-git-debug
- (if errmsg
- (message "%s" errmsg)
- (message "Git returned with exit-code %s" exit))))
+ (cond ((not magit-git-debug))
+ (errmsg (message "%s" errmsg))
+ ((zerop exit))
+ ((message "Git returned with exit-code %s" exit))))
(or errmsg exit))
(ignore-errors (delete-file log))))
(magit-process-git (list t nil) args)))