Function: majutsu-rebase-execute

majutsu-rebase-execute is an interactive and natively compiled function defined in majutsu-rebase.el.

Signature

(majutsu-rebase-execute ARG1)

Documentation

Execute rebase with selected source and destinations.

ARGS are passed 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-rebase.el
;;; majutsu-rebase

;;;###autoload(autoload 'majutsu-rebase-execute "majutsu-rebase" nil t)
(transient-define-suffix majutsu-rebase-execute (args)
  "Execute rebase with selected source and destinations.
ARGS are passed from the transient."
  :description "Execute rebase"
  :class 'majutsu-transient-default-action-suffix
  (interactive (list (transient-args 'majutsu-rebase)))
  (let ((has-dest (or (transient-arg-value "--onto=" args)
                      (transient-arg-value "--insert-after=" args)
                      (transient-arg-value "--insert-before=" args))))
    (if has-dest
        (when (majutsu-confirm 'rebase "Rebase with current selections? ")
          (let ((all-args (cons "rebase" args)))
            (majutsu--message-with-log "Rebasing...")
            (majutsu--debug "Running jj rebase with args: %s" (string-join all-args " "))
            (when (zerop (apply #'majutsu-run-jj all-args))
              (message "Rebase completed"))))
      (majutsu--message-with-log "Please select destination (-o/-A/-B) first"))))