Function: magit-insert-unpushed-to-upstream-or-recent

magit-insert-unpushed-to-upstream-or-recent is a byte-compiled function defined in magit-log.el.

Signature

(magit-insert-unpushed-to-upstream-or-recent)

Documentation

Insert section showing unpushed or other recent commits.

If an upstream is configured for the current branch and it is behind of the current branch, then show the commits that have not yet been pushed into the upstream branch. If no upstream is configured or if the upstream is not behind of the current branch, then show the last magit-log-section-commit-count commits.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-log.el
(defun magit-insert-unpushed-to-upstream-or-recent ()
  "Insert section showing unpushed or other recent commits.
If an upstream is configured for the current branch and it is
behind of the current branch, then show the commits that have
not yet been pushed into the upstream branch.  If no upstream is
configured or if the upstream is not behind of the current branch,
then show the last `magit-log-section-commit-count' commits."
  (let ((upstream (magit-get-upstream-branch)))
    (if (or (not upstream)
            (magit-rev-ancestor-p "HEAD" upstream))
        (magit-insert-recent-commits 'unpushed "@{upstream}..")
      (magit-insert-unpushed-to-upstream))))