Function: magit-commit-autofixup
magit-commit-autofixup is an autoloaded, interactive and byte-compiled
function defined in magit-commit.el.
Signature
(magit-commit-autofixup ARG1 ARG2 ARG3)
Documentation
Spread staged or unstaged changes across recent commits.
If there are any staged then spread only those, otherwise spread all unstaged changes. With a prefix argument use a transient command to select infix arguments.
This command requires the git-autofixup script, which is available from
https://github.com/torbiak/git-autofixup. See magit-commit-absorb for
an alternative implementation.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-commit.el
;;;###autoload(autoload 'magit-commit-autofixup "magit-commit" nil t)
(transient-define-prefix magit-commit-autofixup (phase commit args)
"Spread staged or unstaged changes across recent commits.
If there are any staged then spread only those, otherwise spread all
unstaged changes. With a prefix argument use a transient command to
select infix arguments.
This command requires the git-autofixup script, which is available from
https://github.com/torbiak/git-autofixup. See `magit-commit-absorb' for
an alternative implementation."
:value '("-vv")
["Arguments"
(magit-autofixup:--context)
(magit-autofixup:--strict)
("-v" "Increase verbosity" "-vv")]
["Actions"
("x" "Absorb" magit-commit-autofixup)]
(interactive (if current-prefix-arg
(list 'transient nil nil)
(list 'select
(magit-get-upstream-branch)
(transient-args 'magit-commit-autofixup))))
(if (eq phase 'transient)
(transient-setup 'magit-commit-autofixup)
(unless (magit-git-executable-find "git-autofixup")
(user-error "This command requires the git-autofixup script, which %s"
"is available from https://github.com/torbiak/git-autofixup"))
(unless (magit-anything-modified-p)
(user-error "There are no changes that could be absorbed"))
(when commit
(setq commit (magit-rebase-interactive-assert commit t)))
(if (and commit (eq phase 'run))
(prog1 t (magit-run-git-async "autofixup" args commit))
(magit-log-select
(lambda (commit)
(with-no-warnings ; about non-interactive use
(magit-commit-autofixup 'run commit args)))
nil nil nil nil commit))))