bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Juri Linkov
Subject: bug#59414: 29.0.50; Have vc-git-expanded-log-entry pass --stat
Date: Sun, 20 Nov 2022 19:52:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

> 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)))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]