branch: elpa/magit
commit c1ffff040270c7bdbae278b9468a2d07d5dbf2c9
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
Make --signoff available in more menus
But "demote" it a bit, in all menus, by placing it after `--gpg-sign'
and putging it on level 6.
Closes #5297.
---
lisp/magit-commit.el | 2 +-
lisp/magit-merge.el | 3 ++-
lisp/magit-sequence.el | 14 ++++++++------
lisp/magit.el | 6 ++++++
4 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el
index 9469bcdbe79..c26885d69d6 100644
--- a/lisp/magit-commit.el
+++ b/lisp/magit-commit.el
@@ -128,8 +128,8 @@ Also see https://github.com/magit/magit/issues/4132."
("-R" "Claim authorship and reset author date" "--reset-author")
(magit:--author :description "Override the author")
(magit-commit:--date :level 7)
- ("-s" "Add Signed-off-by line" ("-s" "--signoff"))
(magit:--gpg-sign :level 5)
+ (magit:--signoff :level 6)
(magit-commit:--reuse-message)]
[["Create"
("c" "Commit" magit-commit-create)]
diff --git a/lisp/magit-merge.el b/lisp/magit-merge.el
index af687c6a91b..30d5d8a38d4 100644
--- a/lisp/magit-merge.el
+++ b/lisp/magit-merge.el
@@ -47,7 +47,8 @@
(5 "-b" "Ignore changes in amount of whitespace" "-Xignore-space-change")
(5 "-w" "Ignore whitespace when comparing lines" "-Xignore-all-space")
(5 magit-diff:--diff-algorithm :argument "-Xdiff-algorithm=")
- (5 magit:--gpg-sign)]
+ (5 magit:--gpg-sign)
+ (6 magit:--signoff)]
["Actions"
:if-not magit-merge-in-progress-p
[("m" "Merge" magit-merge-plain)
diff --git a/lisp/magit-sequence.el b/lisp/magit-sequence.el
index 048a53d5021..a1ff3e832ad 100644
--- a/lisp/magit-sequence.el
+++ b/lisp/magit-sequence.el
@@ -144,8 +144,8 @@ This discards all changes made since the sequence started."
("-F" "Attempt fast-forward" "--ff")
("-x" "Reference cherry in commit message" "-x")
("-e" "Edit commit messages" ("-e" "--edit"))
- ("-s" "Add Signed-off-by lines" ("-s" "--signoff"))
- (5 magit:--gpg-sign)]
+ (5 magit:--gpg-sign)
+ (6 magit:--signoff)]
[:if-not magit-sequencer-in-progress-p
["Apply here"
("A" "Pick" magit-cherry-copy)
@@ -378,8 +378,8 @@ the process manually."
("-e" "Edit commit message" ("-e" "--edit"))
("-E" "Don't edit commit message" "--no-edit")
("=s" magit-merge:--strategy)
- ("-s" "Add Signed-off-by lines" ("-s" "--signoff"))
- (5 magit:--gpg-sign)]
+ (5 magit:--gpg-sign)
+ (6 magit:--signoff)]
["Actions"
:if-not magit-sequencer-in-progress-p
("V" "Revert commit(s)" magit-revert-and-commit)
@@ -440,7 +440,8 @@ without prompting."
("-d" "Use author date as committer date" "--committer-date-is-author-date")
("-t" "Use current time as author date" "--ignore-date")
("-s" "Add Signed-off-by lines" ("-s" "--signoff"))
- (5 magit:--gpg-sign)]
+ (5 magit:--gpg-sign)
+ (6 magit:--signoff)]
["Apply"
:if-not magit-am-in-progress-p
("m" "maildir" magit-am-apply-maildir)
@@ -544,7 +545,8 @@ This discards all changes made since the sequence started."
("-i" "Interactive" ("-i" "--interactive"))
("-h" "Disable hooks" "--no-verify")
(7 magit-rebase:--exec)
- (5 magit:--gpg-sign)]
+ (5 magit:--gpg-sign)
+ (6 magit:--signoff)]
[:if-not magit-rebase-in-progress-p
:description (lambda ()
(format (propertize "Rebase %s onto" 'face
'transient-heading)
diff --git a/lisp/magit.el b/lisp/magit.el
index 35addf9141c..b769ded7dfc 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -501,6 +501,12 @@ is run in the top-level directory of the current working
tree."
;;; Shared Infix Arguments
+(transient-define-argument magit:--signoff ()
+ :description "Add Signed-off-by lines"
+ :class 'transient-switch
+ :shortarg "-s"
+ :argument "--signoff")
+
(transient-define-argument magit:--gpg-sign ()
:description "Sign using gpg"
:class 'transient-option