@@ -260,7 +260,7 @@ one from the minibuffer, and move to the next line."
260
260
(" s" " Sink" magit-stgit-sink)
261
261
(" a" " Goto" magit-stgit-goto-popup)]
262
262
[(" c" " Commit" magit-stgit-commit)
263
- (" C" " Uncommit" magit-stgit-uncommit-popup )
263
+ (" C" " Uncommit" magit-stgit-uncommit)
264
264
(" r" " Repair" magit-stgit-repair)
265
265
(" R" " Rebase" magit-stgit-rebase-popup)]
266
266
[(" z" " Undo" magit-stgit-undo-popup)
@@ -422,17 +422,20 @@ one from the minibuffer."
422
422
(or patches (error " No patches provided " )))))
423
423
(magit-run-stgit-and-mark-remove patches " commit" args patches)))
424
424
425
- (magit-define-popup magit-stgit-uncommit-popup
426
- " Popup console for StGit uncommit."
427
- 'magit-stgit-commands
428
- :options '((?n " Uncommit the specified number of commits" " --num=" read-number))
429
- :actions '((?C " Uncommit" magit-stgit-uncommit))
430
- :default-action #'magit-stgit-uncommit )
425
+ (transient-define-prefix magit-stgit-uncommit ()
426
+ " Uncommit a set of patches."
427
+ :man-page " stg-uncommit"
428
+ [" Arguments"
429
+ (" -n" " Uncommit the first N commits from the base down" " --number="
430
+ :reader (lambda (prompt _initial-input history )
431
+ (number-to-string (read-number prompt nil history))))]
432
+ [" Actions"
433
+ (" C" " Uncommit" magit-stgit--uncommit)])
431
434
432
435
;;;### autoload
433
- (defun magit-stgit-uncommit (&rest args )
434
- " Turn regular commits into StGit patches ."
435
- (interactive (-flatten ( list ( magit-stgit-uncommit-arguments)) ))
436
+ (defun magit-stgit-- uncommit (&rest args )
437
+ " Invoke `stg uncommit ARGS...' ."
438
+ (interactive (transient-args ' magit-stgit-uncommit ))
436
439
(magit-run-stgit " uncommit" args))
437
440
438
441
(magit-define-popup magit-stgit-refresh-popup
@@ -681,7 +684,7 @@ the To, Cc, and Bcc fields for all patches."
681
684
:help " Edit a patch" ]
682
685
[" Commit patch" magit-stgit-commit
683
686
:help " Permanently store the base patch into the stack base" ]
684
- [" Uncommit patch" magit-stgit-uncommit-popup
687
+ [" Uncommit patch" magit-stgit-uncommit
685
688
:help " Turn a regular commit into an StGit patch" ]
686
689
[" Delete patch" magit-stgit-delete-popup
687
690
:help " Delete an StGit patch" ]
0 commit comments