Subject: bug#59414: 29.0.50; Have vc-git-expanded-log-entry pass --stat

From: Juri Linkov <[email-masked]>
Date: Sun, 20 Nov 2022 19:52:55 +0200

> I would like to add --stat to the list of options passed to git-log(1)
> by vc-git-expanded-log-entry.  I think it makes VC root logs for Git
> repositories much more informative with little disadvantage.  Any comments?

Not sure about adding --stat by default since often it produces too long
multi-line output.  But definitely the options should be customizable
to avoid adding such cruft to config files:

  (with-eval-after-load 'vc-git
    ;; OVERRIDDEN AND ADDED "--pretty=fuller"
    (defun vc-git-expanded-log-entry (revision)
      (with-temp-buffer
        (apply 'vc-git-command t nil nil (list "log" revision "-1" "--pretty=fuller" "--"))
        (goto-char (point-min))
        (unless (eobp)
          ;; Indent the expanded log entry.
          (while (re-search-forward "^  " nil t)
            (replace-match "")
            (forward-line))
          (buffer-string)))))