From e275aaa88807e407d6e17393c50f5b92f222f45a Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Fri, 17 Jan 2025 07:45:33 +0100 Subject: 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. --- lisp/magit-commit.el | 3 +-- 1 file changed, 1 insertion(+), 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 -- cgit v1.0