[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit 141dd46798 6/6: diff: Make --diff-merges option
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit 141dd46798 6/6: diff: Make --diff-merges option available |
Date: |
Tue, 12 Sep 2023 18:59:31 -0400 (EDT) |
branch: elpa/git-commit
commit 141dd46798e5cae57617e941418ebbb3a2172f5e
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
diff: Make --diff-merges option available
The "separate" and "remerge" values aren't supported yet.
Re #4989.
---
lisp/magit-diff.el | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index b7fdc82705..cedba6a80e 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -898,6 +898,7 @@ and `:slant'."
("-W" "Show surrounding functions" ("-W" "--function-context"))]
["Tune arguments"
(magit-diff:--diff-algorithm)
+ (magit-diff:--diff-merges)
(magit-diff:-M)
(magit-diff:-C)
(5 "-R" "Reverse sides" "-R")
@@ -932,6 +933,7 @@ and `:slant'."
("-W" "Show surrounding functions" ("-W" "--function-context"))]
["Tune arguments"
(magit-diff:--diff-algorithm)
+ (magit-diff:--diff-merges)
(magit-diff:-M)
(magit-diff:-C)
(5 "-R" "Reverse sides" "-R"
@@ -1021,6 +1023,22 @@ and `:slant'."
(?p "[p]atience" "patience")
(?h "[h]istogram" "histogram")))
+(transient-define-argument magit-diff:--diff-merges ()
+ :description "Diff merges"
+ :class 'transient-option
+ :key "-X"
+ :argument "--diff-merges="
+ :reader #'magit-diff-select-merges
+ :always-read t)
+
+(defun magit-diff-select-merges (&rest _ignore)
+ (magit-read-char-case nil t
+ (?u "[u]nspecified" nil)
+ (?o "[o]ff" "off")
+ (?f "[f]irst-parent" "first-parent")
+ (?c "[c]ombined" "combined")
+ (?d "[d]ense-combined" "dense-combined")))
+
(transient-define-argument magit-diff:--ignore-submodules ()
:description "Ignore submodules"
:class 'transient-option
@@ -2582,7 +2600,7 @@ Staging and applying changes is documented in info node
(defun magit-insert-revision-diff ()
"Insert the diff into this `magit-revision-mode' buffer."
(magit--insert-diff t
- "show" "-p" "--cc" "--format=" "--no-prefix"
+ "show" "-p" "--format=" "--no-prefix"
(and (member "--stat" magit-buffer-diff-args) "--numstat")
magit-buffer-diff-args
(magit--rev-dereference magit-buffer-revision)
- [nongnu] elpa/git-commit updated (4fe4817cf8 -> 141dd46798), ELPA Syncer, 2023/09/12
- [nongnu] elpa/git-commit 0f64ac4abd 4/6: magit-apply-{hunks, hunk, region}: Cosmetics, ELPA Syncer, 2023/09/12
- [nongnu] elpa/git-commit 00ecaab774 5/6: magit-diff:--diff-algorithm: Always read value, ELPA Syncer, 2023/09/12
- [nongnu] elpa/git-commit 5cd0980c81 3/6: magit-diff--combined-p: Also match --combined, ELPA Syncer, 2023/09/12
- [nongnu] elpa/git-commit 141dd46798 6/6: diff: Make --diff-merges option available,
ELPA Syncer <=
- [nongnu] elpa/git-commit 5043c0c487 1/6: magit-diff--combined-p: New function, ELPA Syncer, 2023/09/12
- [nongnu] elpa/git-commit 0508d6f388 2/6: magit-diff--combined-p: Minor tweaks, ELPA Syncer, 2023/09/12