]> git.earman.xyz Git - emacsinit.git/commitdiff
Steal some vc-mode config from Protesilaos
authorrearman <rearman@r717.net>
Tue, 19 Aug 2025 16:42:30 +0000 (12:42 -0400)
committerrearman <rearman@r717.net>
Tue, 19 Aug 2025 16:42:30 +0000 (12:42 -0400)
init.el

diff --git a/init.el b/init.el
index 58af819e4e347c2ab5f2213174042b4c8fe475b4..c222fc76904e5a1f2a61ed36fc877039eb47979f 100644 (file)
--- a/init.el
+++ b/init.el
 
 ;; DraftwieldiĊ‹
 (setq vc-make-backup-files t
-      vc-handled-backends '(Git Hg RCS CVS SVN SCCS SRC Bzr)
+      vc-handled-backends '(Git)
+      vc-git-diff-switches '("--patch-with-stat" "--histogram")
+      vc-git-log-switches '("--stat")
+      vc-git-log-edit-summary-target-len 50
+      vc-git-log-edit-summary-max-len 70
+      vc-find-revision-no-save t
       backup-by-copying t
       backup-directory-alist `((".*" . "~/emacs-backups/")))
 
+(setq vc-git-root-log-format
+      `("%d %h %ai %an: %s"
+       ;; The first shy group matches the characters drawn by --graph.
+       ;; We use numbered groups because `log-view-message-re' wants the
+       ;; revision number to be group 1.
+       ,(concat "^\\(?:[*/\\|]+\\)\\(?:[*/\\| ]+\\)?"
+                "\\(?2: ([^)]+) \\)?\\(?1:[0-9a-z]+\\) "
+                "\\(?4:[0-9]\\{4\\}-[0-9-]\\{4\\}[0-9\s+:-]\\{16\\}\\) "
+                "\\(?3:.*?\\):")
+       ((1 'log-view-message)
+        (2 'change-log-list nil lax)
+        (3 'change-log-name)
+        (4 'change-log-date))))
+
 (setq delete-old-versions t
       kept-new-versions 5
       kept-old-versions 5)