Files
ed-irlandAbhinav Gupta a4109ae3f5
CI / Lint (push) Canceled after 0s
CI / Generate test matrix (push) Canceled after 0s
CI / Test / ${{ matrix.name }} (push) Canceled after 0s
CI / OK (push) Canceled after 0s
GitHub Pages / build (push) Canceled after 0s
GitHub Pages / deploy (push) Canceled after 0s
autofix.ci / autofix (push) Canceled after 0s
msggen: Fill commit and CR messages with external commands (#1170)
Extend `--fill` to generate commit and CR messages with a
user-configured command.
Support commit creation and amendment, branch creation and squash, and
submission of new CRs.

Configure the command with `spice.message.fill.command`.
Set `spice.message.fill=true` to enable filling by default, with
`--no-fill` to opt out.
Explicit messages and message files take precedence.
Submit and squash retain their built-in filling behavior when no command
is configured.

Like Git’s `prepare-commit-msg` and `commit-msg` hooks, the command
receives a message-file path and edits it in place.
Additional arguments identify the invoking operation and, for squash and
submission, the selected commit range:

    command MESSAGE_FILE OPERATION
    command MESSAGE_FILE OPERATION BASE_SHA HEAD_SHA

The command inherits stdin, stdout, and stderr, allowing terminal
editors and interactive scripts.
A nonzero exit status aborts the operation.

Commit operations invoke the command as Git’s message editor, deferring
index normalization to Git.
Scripts can use `git diff --cached` to inspect the changes being
committed.
For squash and submission, scripts inspect the supplied commit range
through Git.
For CRs, the first line becomes the title and the remainder becomes the
body.

---------

Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
2026-11-25 13:27:09 -08:00
..