branch: elpa/magit
commit cd6cf89d6a306f4fcdcfc497828e8cff39fe43ca
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
Use different face for debug-only process sections
---
lisp/magit-git.el | 7 ++++---
lisp/magit-process.el | 14 ++++++++------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 50b82a3e4e4..5ec9021e91b 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -59,7 +59,7 @@
(section exit-code))
(declare-function magit-process-git "magit-process" (destination &rest args))
(declare-function magit-process-insert-section "magit-process"
- (pwd program args &optional errcode errlog))
+ (pwd program args &optional errcode errlog face))
(defvar magit-this-error)
(defvar magit-process-error-message-regexps)
@@ -400,7 +400,8 @@ still subject to major changes. Also see
`magit-git-string-p'."
(with-current-buffer (magit-process-buffer t)
(magit-process-insert-section default-directory
magit-git-executable args
- status buf)))
+ status buf
+ 'magit-section-secondary-heading)))
(when-let ((status-buf (magit-get-mode-buffer 'magit-status-mode)))
(let ((msg (magit--locate-error-message)))
(with-current-buffer status-buf
@@ -494,7 +495,7 @@ insert the run command and stderr into the process buffer."
(magit-process-insert-section
default-directory magit-git-executable
(magit-process-git-arguments args)
- exit log)
+ exit log 'magit-section-secondary-heading)
exit)))))
(cond ((not magit-git-debug))
(errmsg (message "%s" errmsg))
diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index 7c9ba4a71c2..9f0b44948c6 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -691,7 +691,8 @@ Magit status buffer."
(prog1 (magit-process-insert-section pwd program args nil nil)
(backward-char 1))))))
-(defun magit-process-insert-section (pwd program args &optional errcode errlog)
+(defun magit-process-insert-section
+ (pwd program args &optional errcode errlog face)
(let ((inhibit-read-only t)
(magit-insert-section--current nil)
(magit-insert-section--parent magit-root-section)
@@ -704,11 +705,12 @@ Magit status buffer."
"run "))
(when magit-process-timestamp-format
(insert (format-time-string magit-process-timestamp-format) " "))
- (unless (equal (expand-file-name pwd)
- (expand-file-name default-directory))
- (insert (file-relative-name pwd default-directory) ?\s))
- (insert (magit-process--format-arguments program args))
- (magit-insert-heading)
+ (let ((cmd (concat
+ (and (not (equal (expand-file-name pwd)
+ (expand-file-name default-directory)))
+ (concat (file-relative-name pwd default-directory) " "))
+ (magit-process--format-arguments program args))))
+ (magit-insert-heading (if face (propertize cmd 'face face) cmd)))
(when errlog
(if (bufferp errlog)
(insert (with-current-buffer errlog