branch: elpa/magit
commit 6efe13e701118719a61fee2b6eb465b8fa4a028e
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
Highlight amend! markers as well
In regular expressions, duplicated the exclamation mark for increased
grepability.
---
lisp/git-rebase.el | 2 +-
lisp/magit-diff.el | 2 +-
lisp/magit-git.el | 2 +-
lisp/magit-log.el | 2 +-
lisp/magit.el | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el
index e408408edf5..540932ebc96 100644
--- a/lisp/git-rebase.el
+++ b/lisp/git-rebase.el
@@ -776,7 +776,7 @@ running \"man git-rebase\" at the command line) for
details."
(git-rebase-match-comment-line 0 'font-lock-comment-face)
("\\[[^[]*\\]"
0 'magit-keyword t)
- ("\\(?:fixup!\\|squash!\\)"
+ ("\\(?:fixup!\\|squash!\\|amend!\\)"
0 'magit-keyword-squash t)
(,(format "^%s Rebase \\([^ ]*\\) onto \\([^ ]*\\)" comment-start)
(1 'git-rebase-comment-hash t)
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index 0ba0ce5d89a..fa75aaf9743 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -2773,7 +2773,7 @@ or a ref which is not a branch, then it inserts nothing."
(defun magit-highlight-squash-markers ()
"Highlight \"squash!\" and similar markers."
- (when (looking-at "\\(?:squash\\|fixup\\)!")
+ (when (looking-at "\\(?:squash!\\|fixup!\\|amend!\\)")
(magit--add-face-text-property (match-beginning 0) (match-end 0)
'magit-keyword-squash)))
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index c529518a87b..8f0c18be513 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -1407,7 +1407,7 @@ Git."
(defun magit-rev-fixup-target (rev)
(let ((msg (magit-rev-format "%s" rev)))
(save-match-data
- (and (string-match "\\`\\(fixup\\|squash\\)! \\(.+\\)" msg)
+ (and (string-match "\\`\\(squash!\\|fixup!\\|amend!\\) \\(.+\\)" msg)
(magit-rev-format
"%h" (format "%s^{/^%s}" rev
(magit--ext-regexp-quote (match-string 2 msg))))))))
diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index 6c0159913c5..83030deff82 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -1703,7 +1703,7 @@ Type \\[magit-log-select-quit] to abort without selecting
a commit."
(if initial
(magit-log-goto-commit-section initial)
(while-let ((rev (magit-section-value-if 'commit))
- ((string-match-p "\\`\\(fixup\\|squash\\)!"
+ ((string-match-p "\\`\\(squash!\\|fixup!\\|amend!\\)"
(magit-rev-format "%s" rev)))
(section (magit-current-section))
(next (car (magit-section-siblings section 'next))))
diff --git a/lisp/magit.el b/lisp/magit.el
index 35594e9cc16..35addf9141c 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -193,7 +193,7 @@ and/or `magit-branch-remote-head'."
(defface magit-keyword-squash
'((t :inherit font-lock-warning-face))
- "Face for squash! and fixup! keywords in commit messages."
+ "Face for squash! and similar keywords in commit messages."
:group 'magit-faces)
(defface magit-signature-good