Function: magit-insert-rebase-sequence
magit-insert-rebase-sequence is a byte-compiled function defined in
magit-sequence.el.
Signature
(magit-insert-rebase-sequence)
Documentation
Insert section for the on-going rebase sequence.
If no such sequence is in progress, do nothing.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-sequence.el
(defun magit-insert-rebase-sequence ()
"Insert section for the on-going rebase sequence.
If no such sequence is in progress, do nothing."
(when (magit-rebase-in-progress-p)
(let* ((gitdir (magit-gitdir))
(mergep (file-directory-p (expand-file-name "rebase-merge" gitdir)))
(dir (if mergep "rebase-merge/" "rebase-apply/"))
(name (thread-first (concat dir "head-name")
(expand-file-name gitdir)
magit-file-line))
(onto (thread-first (concat dir "onto")
(expand-file-name gitdir)
magit-file-line))
(onto (or (magit-rev-name onto name)
(magit-rev-name onto "refs/heads/*") onto))
(name (or (magit-rev-name name "refs/heads/*") name)))
(magit-insert-section (rebase-sequence)
(magit-insert-heading (format "Rebasing %s onto %s" name onto))
(if mergep
(magit-rebase-insert-merge-sequence onto)
(magit-rebase-insert-apply-sequence onto))
(insert ?\n)))))