Function: magit-read-similarity-index

magit-read-similarity-index is a natively compiled function defined in magit-diff.el.

Signature

(magit-read-similarity-index PROMPT INITIAL-INPUT HISTORY)

Documentation

Read a similarity index. See "--find-renames" in git-diff(1) manpage.

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-diff.el
(defun magit-read-similarity-index (prompt initial-input history)
  "Read a similarity index.  See \"--find-renames\" in git-diff(1) manpage."
  (catch 'valid
    (while t
      (let ((input (read-from-minibuffer prompt initial-input nil nil history)))
        (if (string-match-p "\\`[0-9]+%?\\'" input)
            (throw 'valid input)
	  (message "Please enter a percentage ending in %%, %s"
                   "or a fraction, omitting the implied leading \"0.\"")
	  (sit-for 1))))))