Function: magit-next-reference

magit-next-reference is an interactive and byte-compiled function defined in magit-log.el.

Signature

(magit-next-reference &optional PREVIOUS)

Documentation

Move to the next Git reference appearing in the current buffer.

Move to the next location that uses a face appearing in magit-reference-movement-faces. If repeat-mode(var)/repeat-mode(fun) is enabled, this command and its counterpart can be repeated using p (magit-previous-reference) and r (magit-next-reference).

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-log.el
(defun magit-next-reference (&optional previous)
  "Move to the next Git reference appearing in the current buffer.

Move to the next location that uses a face appearing in
`magit-reference-movement-faces'.  If `repeat-mode' is enabled,
this command and its counterpart can be repeated using \
\\<magit-reference-navigation-repeat-map>\
\\[magit-previous-reference] and \\[magit-next-reference]."
  (interactive)
  (catch 'found
    (let ((pos (point)))
      (while (and (not (eobp))
                  (setq pos (if previous
                                (previous-single-property-change pos 'face)
                              (next-single-property-change pos 'face))))
        (when (cl-intersection (ensure-list (get-text-property pos 'face))
                               magit-reference-movement-faces)
          (throw 'found (goto-char pos))))
      (message "No more references"))))