Function: magit-log-select
magit-log-select is a byte-compiled function defined in magit-log.el.
Signature
(magit-log-select PICK &optional MSG QUIT BRANCH ARGS INITIAL)
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-log.el
(defun magit-log-select (pick &optional msg quit branch args initial)
(declare (indent defun))
(unless initial
(setq initial (magit-commit-at-point)))
(magit-log-select-setup-buffer
(or branch (magit-get-current-branch) "HEAD")
(append args
(car (magit-log--get-value 'magit-log-select-mode 'direct))))
(if initial
(magit-log-goto-commit-section initial)
(while-let* ((rev (magit-section-value-if 'commit))
(_(string-match-p "\\`\\(squash!\\|fixup!\\|amend!\\)"
(magit-rev-format "%s" rev)))
(section (magit-current-section))
(next (car (magit-section-siblings section 'next))))
(magit-section-goto next)))
(setq magit-log-select-pick-function pick)
(setq magit-log-select-quit-function quit)
(when magit-log-select-show-usage
(let ((pick (propertize (substitute-command-keys
"\\[magit-log-select-pick]")
'font-lock-face
'magit-header-line-key))
(quit (propertize (substitute-command-keys
"\\[magit-log-select-quit]")
'font-lock-face
'magit-header-line-key)))
(setq msg (format-spec
(if msg
(if (string-suffix-p "," msg)
(concat msg " or %q to abort")
msg)
"Type %p to select commit at point, or %q to abort")
`((?p . ,pick)
(?q . ,quit)))))
(magit--add-face-text-property
0 (length msg) 'magit-header-line-log-select t msg)
(when (memq magit-log-select-show-usage '(both header-line))
(magit-set-header-line-format msg))
(when (memq magit-log-select-show-usage '(both echo-area))
(message "%s" (substring-no-properties msg)))))