diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2025-01-17 07:45:30 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2025-01-17 07:45:30 +0100 |
| commit | 3a23ce5f5089c1b2e35ed5e03f660f65901b8529 (patch) | |
| tree | 72eebf2c1b92bc02b36846d7f3e33f7da2258b61 /lisp/magit-commit.el | |
| parent | 797f9248a42e54ad1bc5029f2f073ad0348a7046 (diff) | |
magit-commit-squash-internal: Change parameter order
This order better reflects the order in which the respective subtasks
happen. Going forward it will also mean that fewer commands have to
use nil to skip over an optional parameter. Leave CONFIRMED at the end
because it is only used recursively. Also use more descriptive non-nil
arguments.
Diffstat (limited to 'lisp/magit-commit.el')
| -rw-r--r-- | lisp/magit-commit.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el index 8bac51f..78c39d2 100644 --- a/lisp/magit-commit.el +++ b/lisp/magit-commit.el @@ -277,24 +277,24 @@ Otherwise the commit at point may be used without confirmation depending on the value of option `magit-commit-squash-confirm'." (interactive (list (magit-commit-at-point) (magit-commit-arguments))) - (magit-commit-squash-internal "--squash=" commit args nil t)) + (magit-commit-squash-internal "--squash=" commit args 'edit)) ;;;###autoload (defun magit-commit-instant-fixup (&optional commit args) "Create a fixup commit targeting COMMIT and instantly rebase." (interactive (list (magit-commit-at-point) (magit-commit-arguments))) - (magit-commit-squash-internal "--fixup=" commit args t)) + (magit-commit-squash-internal "--fixup=" commit args nil 'rebase)) ;;;###autoload (defun magit-commit-instant-squash (&optional commit args) "Create a squash commit targeting COMMIT and instantly rebase." (interactive (list (magit-commit-at-point) (magit-commit-arguments))) - (magit-commit-squash-internal "--squash=" commit args t)) + (magit-commit-squash-internal "--squash=" commit args nil 'rebase)) (defun magit-commit-squash-internal - (option commit &optional args rebase edit confirmed) + (option commit &optional args edit rebase confirmed) (when-let ((args (magit-commit-assert args (not edit)))) (when (and commit rebase (not (magit-rev-ancestor-p commit "HEAD"))) (magit-read-char-case @@ -326,7 +326,7 @@ depending on the value of option `magit-commit-squash-confirm'." (magit-log-select (lambda (commit) (when (and (magit-commit-squash-internal option commit args - rebase edit t) + edit rebase t) rebase) (magit-commit-amend-assert commit) (magit-rebase-interactive-1 commit |
