branch: elpa/git-commit
commit 14ae9f6d9016d8ced2cc8daad949a73b150c2f13
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
Allow several infix arguments to have an empty value
Closes #4379.
---
Documentation/RelNotes/3.3.0.org | 4 ++++
lisp/magit-blame.el | 2 ++
lisp/magit-diff.el | 2 ++
lisp/magit-sequence.el | 1 +
4 files changed, 9 insertions(+)
diff --git a/Documentation/RelNotes/3.3.0.org b/Documentation/RelNotes/3.3.0.org
index 02b883e..25df55f 100644
--- a/Documentation/RelNotes/3.3.0.org
+++ b/Documentation/RelNotes/3.3.0.org
@@ -7,6 +7,10 @@
- ~magit-stash-both~ now asks before discarding merge state. #4345
+- Several infix arguments that previously could only be disabled
+ or have a numeric value can now also be enabled without having
+ an explicit numeric value. #4379
+
** Fixes since v3.2.0
- Make ~magit-branch-remote-head~ and ~magit-branch-current~ fall back
diff --git a/lisp/magit-blame.el b/lisp/magit-blame.el
index 91e71a0..ecb0ce8 100644
--- a/lisp/magit-blame.el
+++ b/lisp/magit-blame.el
@@ -915,12 +915,14 @@ instead of the hash, like `kill-ring-save' would."
:description "Detect lines moved or copied within a file"
:class 'transient-option
:argument "-M"
+ :allow-empty t
:reader 'transient-read-number-N+)
(transient-define-argument magit-blame:-C ()
:description "Detect lines moved or copied between files"
:class 'transient-option
:argument "-C"
+ :allow-empty t
:reader 'transient-read-number-N+)
;;; Utilities
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index 004cb17..8d0ac07 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -967,12 +967,14 @@ and `:slant'."
:description "Detect renames"
:class 'transient-option
:argument "-M"
+ :allow-empty t
:reader 'transient-read-number-N+)
(transient-define-argument magit-diff:-C ()
:description "Detect copies"
:class 'transient-option
:argument "-C"
+ :allow-empty t
:reader 'transient-read-number-N+)
(transient-define-argument magit-diff:--diff-algorithm ()
diff --git a/lisp/magit-sequence.el b/lisp/magit-sequence.el
index 7940759..d1373c9 100644
--- a/lisp/magit-sequence.el
+++ b/lisp/magit-sequence.el
@@ -436,6 +436,7 @@ without prompting."
:description "Remove leading slashes from paths"
:class 'transient-option
:argument "-p"
+ :allow-empty t
:reader 'transient-read-number-N+)
;;;###autoload