Function: magit-diff-read-range-or-commit
magit-diff-read-range-or-commit is a natively compiled function
defined in magit-diff.el.
Signature
(magit-diff-read-range-or-commit PROMPT &optional SECONDARY-DEFAULT MBASE)
Documentation
Read range or revision with special diff range treatment.
If MBASE is non-nil, prompt for which rev to place at the end of
a "revA...revB" range. Otherwise, always construct
"revA..revB" range.
Source Code
;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-diff.el
(defun magit-diff-read-range-or-commit (prompt &optional secondary-default mbase)
"Read range or revision with special diff range treatment.
If MBASE is non-nil, prompt for which rev to place at the end of
a \"revA...revB\" range. Otherwise, always construct
\"revA..revB\" range."
(or (magit-diff--region-range t mbase)
(magit-read-range prompt
(or (pcase (magit-diff--dwim)
(`(commit . ,value)
(format "%s^..%s" value value))
((and range (pred stringp))
range))
secondary-default
(magit-get-current-branch)))))