Function: majutsu-restore-execute
majutsu-restore-execute is an interactive and natively compiled
function defined in majutsu-restore.el.
Signature
(majutsu-restore-execute ARG1)
Documentation
Execute jj restore with ARGS from the transient.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-restore.el
;;;###autoload(autoload 'majutsu-restore-execute "majutsu-restore" nil t)
(transient-define-suffix majutsu-restore-execute (args)
"Execute jj restore with ARGS from the transient."
:description "Execute restore"
:class 'majutsu-transient-default-action-suffix
(interactive (list (transient-args 'majutsu-restore)))
(pcase-let* ((`(,args ,filesets) (majutsu-filesets-split-transient-value args))
;; jj presents destination on the left and restore source on
;; the right. The complement plan keeps that source tree and
;; replays only unselected changes forward from the left.
(plan (majutsu-interactive-build-replay-plan-if-selected
nil 'complement))
(selector (and plan (majutsu-restore--patch-selector)))
(args (if plan
(majutsu-restore--remove-interactive-tool-args args)
args)))
(if plan
(progn
(majutsu-restore--check-patch-selector args selector)
(majutsu-interactive-run-replay-plan "restore" args filesets plan)
(majutsu-interactive-clear))
(let ((exit (apply #'majutsu-run-jj
"restore"
(majutsu-jj-append-filesets args filesets))))
(when (zerop exit)
(message "Restored successfully"))))))