Function: magit--insert-modules-logs

magit--insert-modules-logs is a natively compiled function defined in magit-submodule.el.

Signature

(magit--insert-modules-logs HEADING TYPE RANGE)

Documentation

For internal use, don't add to a hook.

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-submodule.el
(defun magit--insert-modules-logs (heading type range)
  "For internal use, don't add to a hook."
  (when-let ((_(not (magit-ignore-submodules-p)))
             (modules (magit-list-module-paths)))
    (magit-insert-section ((eval type) nil t)
      (string-match "\\`\\(.+\\) \\([^ ]+\\)\\'" heading)
      (magit-insert-heading
        (propertize (match-str 1 heading)
                    'font-lock-face 'magit-section-heading)
        " "
        (propertize (match-str 2 heading)
                    'font-lock-face 'magit-branch-remote)
        ":")
      (dolist (module modules)
        (when-let*
            ((default-directory (expand-file-name module))
             (_(file-exists-p (expand-file-name ".git")))
             (all-tags " ")
             (lines (mapcar (lambda (line)
                              (pcase-let*
                                  ((`(,rev ,msg ,tags)
                                    (split-string line ""))
                                   (tags (and (not (equal tags ""))
                                              (magit-format-ref-labels tags))))
                                (setq all-tags (concat all-tags tags))
                                (list rev msg tags)))
                            (magit-git-lines
                             "-c" "push.default=current"
                             "log" "--format=%h%x0c%s%x0c%D"
                             "--decorate=full" "--decorate-refs=refs/tags/"
                             range)))
             (count (length lines))
             (_(> count 0)))
          (magit-insert-section
              ( module module t
                :range range)
            (magit-insert-heading count
              (propertize module 'font-lock-face 'magit-diff-file-heading)
              (and (not (equal all-tags " ")) all-tags))
            (pcase-dolist (`(,rev ,msg ,tags) lines)
              (magit-insert-section (module-commit rev t)
                (insert (propertize rev 'font-lock-face 'magit-hash) " "
                        (if tags (concat tags " ") "")
                        (magit-log--wash-summary msg) "\n"))))))
      (magit-cancel-section 'if-empty)
      (insert ?\n))))