|
139 | 139 | Any list in ARGS is flattened."
|
140 | 140 | (magit-run-stgit-callback (lambda ()) args))
|
141 | 141 |
|
| 142 | +(defun magit-run-stgit-async (&rest args) |
| 143 | + "Asynchronously run StGit command with given arguments. |
| 144 | +Any list in ARGS is flattened." |
| 145 | + (with-editor "GIT_EDITOR" |
| 146 | + (let ((magit-process-popup-time -1)) |
| 147 | + (message "Running %s %s" magit-stgit-executable |
| 148 | + (mapconcat 'identity (-flatten args) " ")) |
| 149 | + (apply #'magit-start-process magit-stgit-executable nil (-flatten args))))) |
| 150 | + |
142 | 151 | (defun magit-run-stgit-and-mark-remove (patches &rest args)
|
143 | 152 | "Run `magit-run-stgit' and `magit-stgit-mark-remove'.
|
144 | 153 | Argument PATCHES sets the marks to remove, and ARGS the arguments to StGit."
|
@@ -295,12 +304,7 @@ Else, asks the user for a patch name."
|
295 | 304 | "Create a new StGit patch.
|
296 | 305 | Use ARGS to pass additional arguments."
|
297 | 306 | (interactive (magit-stgit-new-arguments))
|
298 |
| - (with-editor "GIT_EDITOR" |
299 |
| - (let ((magit-process-popup-time -1)) |
300 |
| - (message "Running %s %s" magit-git-executable |
301 |
| - (mapconcat 'identity (-flatten (list "new" args)) " ")) |
302 |
| - (apply #'magit-start-process magit-stgit-executable nil |
303 |
| - "new" args)))) |
| 307 | + (magit-run-stgit-async "new" args)) |
304 | 308 |
|
305 | 309 | (magit-define-popup magit-stgit-float-popup
|
306 | 310 | "Popup console for StGit float."
|
|
0 commit comments