Function: magit-rebase-interactive-1
magit-rebase-interactive-1 is a byte-compiled function defined in
magit-sequence.el.
Signature
(magit-rebase-interactive-1 COMMIT ARGS MESSAGE &optional EDITOR DELAY-EDIT-CONFIRM NOASSERT CONFIRM EXACT)
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-sequence.el
(defun magit-rebase-interactive-1
( commit args message
&optional editor delay-edit-confirm noassert confirm exact)
(declare (indent 2))
(cond ((not commit))
((not (magit-rev-ancestor-p commit "HEAD"))
(user-error "%s isn't an ancestor of HEAD" commit))
((not (magit-commit-parents commit))
(setq args (cons "--root" args)))
((not exact)
(setq commit (concat commit "^"))))
(when (and commit (not noassert))
(setq commit (magit-rebase-interactive-assert
commit delay-edit-confirm
(seq-some (##string-prefix-p "--rebase-merges" %) args))))
(if (and commit (not confirm))
(let ((process-environment process-environment))
(when editor
(push (concat "GIT_SEQUENCE_EDITOR="
(if (functionp editor)
(funcall editor commit)
editor))
process-environment))
(magit-run-git-sequencer "rebase" "-i" args
(and (not (member "--root" args)) commit)))
(magit-log-select
`(lambda (commit)
;; In some cases (currently just magit-rebase-remove-commit), "-c
;; commentChar=#" is added to the global arguments for git. Ensure
;; that the same happens when we chose the commit via
;; magit-log-select, below.
(let ((magit-git-global-arguments (list ,@magit-git-global-arguments)))
(magit-rebase-interactive-1 commit (list ,@args)
,message ,editor ,delay-edit-confirm ,noassert)))
message)))