emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/git-commit 433cf8124d 05/11: git-commit--trailer-regexp: M


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 433cf8124d 05/11: git-commit--trailer-regexp: Match known trailers even if lacking mail
Date: Fri, 27 Oct 2023 19:00:36 -0400 (EDT)

branch: elpa/git-commit
commit 433cf8124d665ad96019f20c0258406c73922604
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    git-commit--trailer-regexp: Match known trailers even if lacking mail
    
    Until now we only highlighted trailers that end with "<mail>" to
    avoid false-positives.  Now we additionally look for the known
    trailers listed in `git-commit-trailers', which doesn't increase
    the risk by much.
---
 lisp/git-commit.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/git-commit.el b/lisp/git-commit.el
index 7d890ebbe1..1451662d30 100644
--- a/lisp/git-commit.el
+++ b/lisp/git-commit.el
@@ -989,7 +989,8 @@ something like:
                 (setq git-commit-need-summary-line nil))))")
 
 (defun git-commit--trailer-regexp ()
-  (format "^\\(%s:\\)\\( .*\\)" (regexp-opt git-commit-trailers)))
+  (format "^\\(\\(%s:\\)\\( .*\\)\\|[-a-zA-Z]+: [^<\n]+? <[^>\n]+>\\)"
+          (regexp-opt git-commit-trailers)))
 
 (defun git-commit-summary-regexp ()
   (if git-commit-need-summary-line



reply via email to

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