]> git.eshelyaron.com Git - emacs.git/commitdiff
Font lock Commit: and CommitDate: lines in Git logs
authorSean Whitton <spwhitton@spwhitton.name>
Wed, 7 Dec 2022 20:12:13 +0000 (13:12 -0700)
committerSean Whitton <spwhitton@spwhitton.name>
Wed, 7 Dec 2022 20:12:13 +0000 (13:12 -0700)
* lisp/vc/vc-git.el (vc-git-log-view-mode): Additionally recognize and
font lock Commit: and CommitDate: lines.  This is relevant when, for
example, the user has added "--format=fuller" to vc-git-log-switches.

lisp/vc/vc-git.el

index 59dfb6c12523cf7396d2979e2cd53c3a51785aa0..83138a6d10795660f18bab5927f15e4c431b0750 100644 (file)
@@ -1434,11 +1434,11 @@ log entries."
          `((,log-view-message-re (1 'change-log-acknowledgment)))
          ;; Handle the case:
          ;; user: foo@bar
-         '(("^Author:[ \t]+\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)"
+         '(("^\\(?:Author\\|Commit\\):[ \t]+\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)"
             (1 'change-log-email))
            ;; Handle the case:
            ;; user: FirstName LastName <foo@bar>
-           ("^Author:[ \t]+\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]"
+           ("^\\(?:Author\\|Commit\\):[ \t]+\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]"
             (1 'change-log-name)
             (2 'change-log-email))
            ("^ +\\(?:\\(?:[Aa]cked\\|[Ss]igned-[Oo]ff\\)-[Bb]y:\\)[ \t]+\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)"
@@ -1449,7 +1449,7 @@ log entries."
            ("^Merge: \\([0-9a-z]+\\) \\([0-9a-z]+\\)"
             (1 'change-log-acknowledgment)
             (2 'change-log-acknowledgment))
-           ("^\\(?:Date:   \\|AuthorDate: \\)\\(.+\\)" (1 'change-log-date))
+           ("^\\(?:Date:   \\|AuthorDate: \\|CommitDate: \\)\\(.+\\)" (1 'change-log-date))
            ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))))