@@ -264,7 +264,7 @@ one from the minibuffer, and move to the next line."
264
264
(" r" " Repair" magit-stgit-repair)
265
265
(" R" " Rebase" magit-stgit-rebase)]
266
266
[(" z" " Undo" magit-stgit-undo)
267
- (" Z" " Redo" magit-stgit-redo-popup )]]
267
+ (" Z" " Redo" magit-stgit-redo)]]
268
268
[" Patch"
269
269
[(" N" " New" magit-stgit-new)
270
270
(" g" " Refresh" magit-stgit-refresh)
@@ -576,19 +576,21 @@ ask for confirmation before deleting."
576
576
(interactive (transient-args 'magit-stgit-undo ))
577
577
(magit-run-stgit " undo" args))
578
578
579
- (magit-define-popup magit-stgit-redo-popup
580
- " Popup console for StGit redo."
581
- 'magit-stgit-commands
582
- :options '((?n " Undo the last N commands" " --number=" read-number))
583
- :switches '((?h " Discard changes in index/worktree" " --hard" ))
584
- :actions '((?Z " Redo" magit-stgit-redo))
585
- :default-action #'magit-stgit-redo )
579
+ (transient-define-prefix magit-stgit-redo ()
580
+ " Undo a previous undo operation."
581
+ :man-page " stg-redo"
582
+ [" Arguments"
583
+ (" -n" " Undo the last N undos" " --number="
584
+ :reader (lambda (prompt _initial-input history )
585
+ (number-to-string (read-number prompt nil history))))
586
+ (" -h" " Discard changes in index/worktree" " --hard" )]
587
+ [" Actions"
588
+ (" Z" " Redo" magit-stgit--redo)])
586
589
587
590
;;;### autoload
588
- (defun magit-stgit-redo (&rest args )
589
- " Undo the last undo operation.
590
- Use ARGS to pass additional arguments."
591
- (interactive (magit-stgit-redo-arguments))
591
+ (defun magit-stgit--redo (&rest args )
592
+ " Invoke `stg redo ARGS...'."
593
+ (interactive (transient-args 'magit-stgit-redo ))
592
594
(magit-run-stgit " redo" args))
593
595
594
596
; ;;; magit-stgit-mail
@@ -716,8 +718,8 @@ the To, Cc, and Bcc fields for all patches."
716
718
" ---"
717
719
[" Undo stack operation" magit-stgit-undo
718
720
:help " Undo a previous stack operation" ]
719
- [" Undo the last undo operation" magit-stgit-redo-popup
720
- :help " Undo the last undo operation" ]))
721
+ [" Redo stack operation" magit-stgit-redo
722
+ :help " Undo a previous undo operation" ]))
721
723
722
724
(easy-menu-add-item 'magit-mode-menu '(" Extensions" ) magit-stgit-mode-menu)
723
725
0 commit comments