Function: git-commit-read-ident
git-commit-read-ident is a byte-compiled function defined in
git-commit.el.
Signature
(git-commit-read-ident PROMPT)
Documentation
Read a name and email, prompting with PROMPT, and return them.
Read them using a single prompt, offering past commit authors as completion candidates. The input must have the form "NAME <EMAIL>".
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/git-commit.el
(defun git-commit-read-ident (prompt)
"Read a name and email, prompting with PROMPT, and return them.
Read them using a single prompt, offering past commit authors as
completion candidates. The input must have the form \"NAME <EMAIL>\"."
(let ((str (magit-completing-read
prompt
(sort (delete-dups
(magit-git-lines "log" "-n9999" "--format=%aN <%ae>"))
#'string<)
nil 'any nil 'git-commit-read-ident-history)))
(save-match-data
(if (string-match "\\`\\([^<]+\\) *<\\([^>]+\\)>\\'" str)
(list (save-match-data (string-trim (match-str 1 str)))
(string-trim (match-str 2 str)))
(user-error "Invalid input")))))