aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-git.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2024-10-19 04:05:34 +0200
committerJonas Bernoulli <jonas@bernoul.li>2024-10-19 04:05:34 +0200
commit5b30c05d3a54266f13a54ca414dbd159f56eb8d9 (patch)
treea9c5a4670097ec984bc808e3530a267a88c4c318 /lisp/magit-git.el
parent527777293fd040eb2e1f2968f95c73a0196f3e04 (diff)
magit--git-insert: Collapse process section if appropriate
Diffstat (limited to 'lisp/magit-git.el')
-rw-r--r--lisp/magit-git.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 2ed5556..1e7c832 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -55,6 +55,8 @@
(declare-function magit-process-buffer "magit-process" (&optional nodisplay))
(declare-function magit-process-file "magit-process"
(process &optional infile buffer display &rest args))
+(declare-function magit-process-finish-section "magit-process"
+ (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))
@@ -488,10 +490,12 @@ insert the run command and stderr into the process buffer."
(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)))))
+ (magit-process-finish-section
+ (magit-process-insert-section
+ default-directory magit-git-executable
+ (magit-process-git-arguments args)
+ exit log)
+ exit)))))
(when magit-git-debug
(if errmsg
(message "%s" errmsg)