aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2025-01-17 07:45:33 +0100
committerJonas Bernoulli <jonas@bernoul.li>2025-01-17 07:45:33 +0100
commite275aaa88807e407d6e17393c50f5b92f222f45a (patch)
tree65dc8afba252cb7630bcbecd12cfdb5895afa6fe /lisp
parentae2218b3c9f809fa82e4b317ae77d67189b20911 (diff)
magit-commit-squash-internal: Always add either --no-edit or --edit
Adding "--edit" is not actually necessary, because the variants that need it, use other arguments, which imply it. But users don't always know which arguments imply which of these two arguments, so it is a nice touch to include this information in the arguments, shown in the process buffer. This also makes it easier to document the behavior of variants; we can now say that some of them use "--edit", without that not actually being true.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/magit-commit.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el
index 681c7c6..b804bca 100644
--- a/lisp/magit-commit.el
+++ b/lisp/magit-commit.el
@@ -337,8 +337,7 @@ depending on the value of option `magit-commit-squash-confirm'."
magit-commit-squash-confirm))))
(let ((magit-commit-show-diff nil))
(push (concat option commit) args)
- (unless edit
- (push "--no-edit" args))
+ (push (if edit "--edit" "--no-edit") args)
(if rebase
(magit-with-editor
(magit-call-git