Skip to content

Patches and git send-email

Antiphon reads patch mail highlighted, exports a thread as a git am series, and can be the sendmail git send-email speaks to.

Reading patches

A message is treated as a patch when its subject carries a [PATCH ...] tag or its body contains a unified diff. The pager colours additions and removals, with file and hunk headers distinct. No setup needed.

Applying a series

Save the current thread's series to an mbox in [PATCH n/m] order (cover letter first, re-rolls resolved to the highest version):

:save-patches <path>

Or apply it straight into a repository with git am:

:apply <repo-dir>

On failure the status line shows git's last words and the repository is left in git's am state, so continue or abort as usual:

git am --continue
git am --abort

Sending with git send-email

Point git at Antiphon once:

git config --global sendemail.sendmailCmd "antiphon sendmail"

Then send as normal:

git send-email 000*.patch

Each message is matched to an account by its From address (against your identity match patterns), queued in the durable outbox, and delivered by antiphond with a sent copy filed. If no daemon is running, one starts and unlocks the vault. If no account matches or the store is unavailable the command exits non-zero without queueing, so git stops rather than half-sending the series.

The classic sendmail flags are honoured (-i, -f envelope sender, recipients as arguments); recipients come from git, not from message headers.