Function: majutsu-new-arguments

majutsu-new-arguments is a natively compiled function defined in majutsu-new.el.

Signature

(majutsu-new-arguments)

Documentation

Return the current new arguments.

If inside the transient, return transient args. Otherwise, if no -r/--insert-after=/--insert-before= is set and point is on a jj-commit section, add -r from that section.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-new.el
(defun majutsu-new-arguments ()
  "Return the current new arguments.
If inside the transient, return transient args.
Otherwise, if no -r/--insert-after=/--insert-before= is set and point is on
a jj-commit section, add -r from that section."
  (let ((args (if (eq transient-current-command 'majutsu-new)
                  (transient-args 'majutsu-new)
                '())))
    (unless (or (transient-arg-value "-r=" args)
                (transient-arg-value "--insert-after=" args)
                (transient-arg-value "--insert-before=" args))
      (when-let* ((rev (magit-section-value-if 'jj-commit)))
        (push (concat "-r=" rev) args)))
    args))