aboutsummaryrefslogtreecommitdiff
path: root/lisp/git-commit.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2017-12-14 18:25:00 +0100
committerJonas Bernoulli <jonas@bernoul.li>2017-12-14 18:25:00 +0100
commitb923a9fc2e0836c2012661a1172e494d28fd9e34 (patch)
treeeae73d270bb06c1f72507cfa9d126d9471f9ee15 /lisp/git-commit.el
parent8589b22bd1bd8130653f7f51efce45f48187927b (diff)
git-commit-font-lock-keywords-2: replace ineffective element
In the past Git might have said: Not currently on any branch. instead of that it now says: HEAD detached at abcdefg. `git-commit-font-lock-keywords-2' used to have an entry for the former but it did not have any effect because only the first submatch would have been colorized but the regexp had no submatches. As a result the face `git-commit-comment-detached' wasn't actually ever used. Now it is used for the "HEAD" in the new output. Also remove the old bogus entry and don't bother colorizing anything for older Git versions.
Diffstat (limited to 'lisp/git-commit.el')
-rw-r--r--lisp/git-commit.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/git-commit.el b/lisp/git-commit.el
index 03cb2d9..b45d84c 100644
--- a/lisp/git-commit.el
+++ b/lisp/git-commit.el
@@ -730,7 +730,7 @@ Added to `font-lock-extend-region-functions'."
(0 'font-lock-comment-face)))
(eval . `(,(format "^%s On branch \\(.*\\)" comment-start)
(1 'git-commit-comment-branch-local t)))
- (eval . `(,(format "^%s Not currently on any branch." comment-start)
+ (eval . `(,(format "^%s \\(HEAD\\) detached at" comment-start)
(1 'git-commit-comment-detached t)))
(eval . `(,(format "^%s %s" comment-start
(regexp-opt git-commit-comment-headings t))