branch: elpa/magit
commit 60527da2fb654a9e3a77a8530015b81176a77767
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-diff{,-refresh}: Move shared arguments to new group variable
---
lisp/magit-diff.el | 67 ++++++++++++++++++++++--------------------------------
lisp/magit.el | 2 +-
2 files changed, 28 insertions(+), 41 deletions(-)
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index 9e9189e301b..6bb06b18168 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -860,31 +860,37 @@ and `:slant'."
;;; Commands
;;;; Prefix Commands
+(eval-and-compile
+ (defvar magit-diff-infix-arguments
+ [:class transient-subgroups
+ ["Limit arguments"
+ (magit:--)
+ (magit-diff:--ignore-submodules)
+ ("-b" "Ignore whitespace changes" ("-b" "--ignore-space-change"))
+ ("-w" "Ignore all whitespace" ("-w" "--ignore-all-space"))
+ ("-D" "Omit preimage for deletes" ("-D" "--irreversible-delete")
+ :level 5)]
+ ["Context arguments"
+ (magit-diff:-U)
+ ("-W" "Show surrounding functions" ("-W" "--function-context"))]
+ ["Tune arguments"
+ (magit-diff:--diff-algorithm)
+ (magit-diff:--diff-merges)
+ (magit-diff:-M)
+ (magit-diff:-C)
+ (magit-diff:-R :level 5)
+ (magit-diff:--color-moved :level 5)
+ (magit-diff:--color-moved-ws :level 5)
+ (magit-diff:--no-ext-diff)
+ (magit-diff:--stat)
+ (magit-diff:--show-signature)]]))
+
;;;###autoload (autoload 'magit-diff "magit-diff" nil t)
(transient-define-prefix magit-diff ()
"Show changes between different versions."
:man-page "git-diff"
:class 'magit-diff-prefix
- ["Limit arguments"
- (magit:--)
- (magit-diff:--ignore-submodules)
- ("-b" "Ignore whitespace changes" ("-b" "--ignore-space-change"))
- ("-w" "Ignore all whitespace" ("-w" "--ignore-all-space"))
- ("-D" "Omit preimage for deletes" ("-D" "--irreversible-delete") :level 5)]
- ["Context arguments"
- (magit-diff:-U)
- ("-W" "Show surrounding functions" ("-W" "--function-context"))]
- ["Tune arguments"
- (magit-diff:--diff-algorithm)
- (magit-diff:--diff-merges)
- (magit-diff:-M)
- (magit-diff:-C)
- (magit-diff:-R :level 5)
- (magit-diff:--color-moved :level 5)
- (magit-diff:--color-moved-ws :level 5)
- (magit-diff:--no-ext-diff)
- (magit-diff:--stat)
- (magit-diff:--show-signature)]
+ [magit-diff-infix-arguments]
["Actions"
[("d" "Dwim" magit-diff-dwim)
("r" "Diff range" magit-diff-range)
@@ -900,26 +906,7 @@ and `:slant'."
"Change the arguments used for the diff(s) in the current buffer."
:man-page "git-diff"
:class 'magit-diff-refresh-prefix
- ["Limit arguments"
- (magit:--)
- (magit-diff:--ignore-submodules)
- ("-b" "Ignore whitespace changes" ("-b" "--ignore-space-change"))
- ("-w" "Ignore all whitespace" ("-w" "--ignore-all-space"))
- ("-D" "Omit preimage for deletes" ("-D" "--irreversible-delete") :level 5)]
- ["Context arguments"
- (magit-diff:-U)
- ("-W" "Show surrounding functions" ("-W" "--function-context"))]
- ["Tune arguments"
- (magit-diff:--diff-algorithm)
- (magit-diff:--diff-merges)
- (magit-diff:-M)
- (magit-diff:-C)
- (magit-diff:-R :level 5)
- (magit-diff:--color-moved :level 5)
- (magit-diff:--color-moved-ws :level 5)
- (magit-diff:--no-ext-diff)
- (magit-diff:--stat)
- (magit-diff:--show-signature)]
+ [magit-diff-infix-arguments]
[["Refresh"
("g" "buffer" magit-diff-refresh)
("s" "buffer and set defaults" transient-set-and-exit)
diff --git a/lisp/magit.el b/lisp/magit.el
index 54f391e2194..bc273b55120 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -24,7 +24,7 @@
;; (dash "2.19.1")
;; (magit-section "4.1.3")
;; (seq "2.24")
-;; (transient "0.8.0")
+;; (transient "20241217")
;; (with-editor "3.4.3"))
;; SPDX-License-Identifier: GPL-3.0-or-later