branch: elpa/magit
commit da6233b03c1e29a2a36a14bfe0d1cb6e47d4effc
Author: Nacho Barrientos <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-commit: Add --reedit-message
---
lisp/magit-commit.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el
index 211d9964e8..79d8d75bdb 100644
--- a/lisp/magit-commit.el
+++ b/lisp/magit-commit.el
@@ -129,7 +129,8 @@ manpage for details.")
(magit-commit:--date :level 7)
(magit:--gpg-sign :level 5)
(magit:--signoff)
- (magit-commit:--reuse-message)]
+ (magit-commit:--reuse-message)
+ (magit-commit:--reedit-message)]
[["Create"
("c" "Commit" magit-commit-create)]
["Edit HEAD"
@@ -177,6 +178,14 @@ manpage for details.")
:reader #'magit-read-reuse-message
:history-key 'magit-revision-history)
+(transient-define-argument magit-commit:--reedit-message ()
+ :description "Reedit commit message"
+ :class 'transient-option
+ :shortarg "-c"
+ :argument "--reedit-message="
+ :reader #'magit-read-reuse-message
+ :history-key 'magit-revision-history)
+
(defun magit-read-reuse-message (prompt &optional default history)
(magit-completing-read prompt (magit-list-refnames)
nil nil nil history