# [StGit PATCH] stgit.el: Show running commands

2 messages from 2008-11-24 to 2008-11-24. Participants: David Kågedal, Karl Hasselström.
Thread: https://gitlist.dev/t/16441

## David Kågedal, 2008-11-24 12:01

Subject: [StGit PATCH] stgit.el: Show running commands
Message-ID: <20081124120136.9163.70947.stgit@krank>
URL: https://gitlist.dev/e/20081124120136.9163.70947.stgit%40krank

```

---
 contrib/stgit.el |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/contrib/stgit.el b/contrib/stgit.el
index 65af068..ec08a5b 100644
--- a/contrib/stgit.el
+++ b/contrib/stgit.el
@@ -68,9 +68,15 @@ Argument DIR is the repository path."
            (display-buffer output-buf t)))))
 (put 'stgit-capture-output 'lisp-indent-function 1)
 
-(defun stgit-run (&rest args)
+(defun stgit-run-silent (&rest args)
   (apply 'call-process "stg" nil standard-output nil args))
 
+(defun stgit-run (&rest args)
+  (let ((msgcmd (mapconcat #'identity args " ")))
+    (message "Running stg %s..." msgcmd)
+    (apply 'call-process "stg" nil standard-output nil args)
+    (message "Running stg %s...done" msgcmd)))
+
 (defun stgit-reload ()
   "Update the contents of the stgit buffer"
   (interactive)
@@ -79,8 +85,8 @@ Argument DIR is the repository path."
         (curpatch (stgit-patch-at-point)))
     (erase-buffer)
     (insert "Branch: ")
-    (stgit-run "branch")
-    (stgit-run "series" "--description")
+    (stgit-run-silent "branch")
+    (stgit-run-silent "series" "--description")
     (stgit-rescan)
     (if curpatch
         (stgit-goto-patch curpatch)
@@ -338,7 +344,7 @@ With numeric prefix argument, pop that many patches."
     (set (make-local-variable 'stgit-edit-patch) patch)
     (setq default-directory dir)
     (let ((standard-output edit-buf))
-      (stgit-run "edit" "--save-template=-" patch))))
+      (stgit-run-silent "edit" "--save-template=-" patch))))
 
 (defun stgit-confirm-edit ()
   (interactive)
@@ -402,7 +408,7 @@ With numeric prefix argument, pop that many patches."
     (set (make-local-variable 'stgit-patches) patch-names)
     (setq default-directory dir)
     (let ((standard-output edit-buf))
-      (apply 'stgit-run "coalesce" "--save-template=-" patch-names))))
+      (apply 'stgit-run-silent "coalesce" "--save-template=-" patch-names))))
 
 (defun stgit-confirm-coalesce ()
   (interactive)

```

## Karl Hasselström, 2008-11-24 15:34

Subject: Re: [StGit PATCH] stgit.el: Show running commands
Message-ID: <20081124153400.GA3094@diana.vm.bytemark.co.uk>
URL: https://gitlist.dev/e/20081124153400.GA3094%40diana.vm.bytemark.co.uk
In-Reply-To: <20081124120136.9163.70947.stgit@krank>

```
Thanks, looks useful.

Sorry I haven't taken the time to apply & push out your patches. I'm
hoping it'll happen Real Soon Now(tm) ...

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

```
