Skip to content

Commit

Permalink
magit-run-stgit-callback: Do not require a callback
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Feb 10, 2025
1 parent 1f37356 commit 4595ef9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions magit-stgit.el
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
(defun magit-run-stgit (&rest args)
"Run StGit command with given arguments.
Any list in ARGS is flattened."
(magit-run-stgit-callback (lambda ()) args))
(magit-run-stgit-callback nil args))

(defun magit-run-stgit-async (&rest args)
"Asynchronously run StGit command with given arguments.
Expand All @@ -162,7 +162,8 @@ Argument PATCHES sets the marks to remove, and ARGS the arguments to StGit."
Function CALLBACK will be executed before refreshing the buffer.
Any list in ARGS is flattened."
(apply #'magit-call-process magit-stgit-executable (-flatten args))
(funcall callback)
(when callback
(funcall callback))
(magit-refresh))

(defun magit-stgit-lines (&rest args)
Expand Down

0 comments on commit 4595ef9

Please sign in to comment.