Function: magit-insert-sequencer-sequence

magit-insert-sequencer-sequence is a byte-compiled function defined in magit-sequence.el.

Signature

(magit-insert-sequencer-sequence)

Documentation

Insert section for the on-going cherry-pick or revert sequence.

If no such sequence is in progress, do nothing.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-sequence.el
;;; Sections

(defun magit-insert-sequencer-sequence ()
  "Insert section for the on-going cherry-pick or revert sequence.
If no such sequence is in progress, do nothing."
  (let ((picking (magit-cherry-pick-in-progress-p)))
    (when (or picking (magit-revert-in-progress-p))
      (let ((dir (magit-gitdir)))
        (magit-insert-section (sequence)
          (magit-insert-heading (if picking "Cherry Picking" "Reverting"))
          (when-let ((lines (cdr (magit-file-lines
                                  (expand-file-name "sequencer/todo" dir)))))
            (dolist (line (nreverse lines))
              (when (string-match
                     "^\\(pick\\|revert\\) \\([^ ]+\\) \\(.*\\)$" line)
                (magit-bind-match-strings (cmd hash msg) line
                  (magit-insert-section (commit hash)
                    (insert (propertize cmd 'font-lock-face 'magit-sequence-pick)
                            " " (propertize hash 'font-lock-face 'magit-hash)
                            " " msg "\n"))))))
          (magit-sequence-insert-sequence
           (magit-file-line
            (expand-file-name (if picking "CHERRY_PICK_HEAD" "REVERT_HEAD")
                              dir))
           (magit-file-line (expand-file-name "sequencer/head" dir)))
          (insert "\n"))))))