Function: magit-commit-reword

magit-commit-reword is an autoloaded, interactive and byte-compiled function defined in magit-commit.el.

Signature

(magit-commit-reword &optional ARGS OVERRIDE-DATE)

Documentation

Reword the message of the last commit, without amending its tree.

With a prefix argument do not update the committer date; without an argument update it. The option magit-commit-reword-override-date can be used to inverse the meaning of the prefix argument. Called non-interactively, the optional OVERRIDE-DATE argument controls this behavior, and the option is of no relevance.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-commit.el
;;;###autoload
(defun magit-commit-reword (&optional args override-date)
  "Reword the message of the last commit, without amending its tree.

With a prefix argument do not update the committer date; without an
argument update it.  The option `magit-commit-reword-override-date'
can be used to inverse the meaning of the prefix argument.  Called
non-interactively, the optional OVERRIDE-DATE argument controls this
behavior, and the option is of no relevance."
  (interactive (list (magit-commit-arguments)
                     (if current-prefix-arg
                         (not magit-commit-reword-override-date)
                       magit-commit-reword-override-date)))
  (magit-commit-amend-assert)
  (cl-pushnew "--allow-empty" args :test #'equal)
  (if override-date
      (magit-run-git-with-editor "commit" "--amend" "--only" args)
    (with-environment-variables
        (("GIT_COMMITTER_DATE" (magit-rev-format "%cD")))
      (magit-run-git-with-editor "commit" "--amend" "--only" args))))