Function: majutsu-revert-arguments
majutsu-revert-arguments is a natively compiled function defined in
majutsu-revert.el.
Signature
(majutsu-revert-arguments)
Documentation
Return the current revert arguments.
If inside the transient, return transient args unchanged. Otherwise, if point is on a revision and args are missing source or destination, fill with --revision and --insert-after defaults.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-revert.el
(defun majutsu-revert-arguments ()
"Return the current revert arguments.
If inside the transient, return transient args unchanged.
Otherwise, if point is on a revision and args are missing source or
destination, fill with --revision and --insert-after defaults."
(let* ((inside-transient (eq transient-current-command 'majutsu-revert))
(args (if inside-transient
(transient-args 'majutsu-revert)
'())))
(unless inside-transient
(when-let* ((rev (magit-section-value-if 'jj-commit)))
(unless (transient-arg-value "--revision=" args)
(setq args (append args (list (concat "--revision=" rev)))))
(unless (or (transient-arg-value "--onto=" args)
(transient-arg-value "--insert-after=" args)
(transient-arg-value "--insert-before=" args))
(setq args (append args (list (concat "--insert-after=" rev)))))))
args))