Function: magit-insert-local-branches

magit-insert-local-branches is a natively compiled function defined in magit-refs.el.

Signature

(magit-insert-local-branches)

Documentation

Insert sections showing all local branches.

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-refs.el
(defun magit-insert-local-branches ()
  "Insert sections showing all local branches."
  (magit-insert-section (local nil)
    (magit-insert-heading t "Branches")
    (dolist (line (magit-refs--format-local-branches))
      (pcase-let ((`(,branch . ,strings) line))
        (magit-insert-section
            ((eval (if branch 'branch 'commit))
             (or branch (magit-rev-parse "HEAD"))
             t)
          (apply #'magit-insert-heading strings)
          (magit-refs--maybe-format-margin branch)
          (magit-refs--insert-cherry-commits branch))))
    (insert ?\n)
    (magit-make-margin-overlay)))