Next: , Previous: Project Check In, Up: Project Check In


4.5.1 Commit Command

The command used to to commit a patch is specified by the :commit-command project option (a string). You can also temporarily change the command in question by calling patcher-mail-commit with a prefix argument. As usual, note that this prefix argument is not meant to modify the affected files on the command-line. It's meant only to punctually modify the commit command itself. The affected files are computed automatically by Patcher.

The commit command supports the same dynamic expansion constructs as the diff command (see Diff Command), and also adds two of its own.

%s
A %s occurring in the commit command string will be replaced with the name of a file containing the commit log message (see Log Message Handling). This file is a temporary file handled by Patcher.
%S
A %S occurring in the commit command string will be replaced with the commit log message itself (see Log Message Handling). Since the intent here is to use the message as a command-line argument, it will be automatically quoted against shell expansion.

Please note that exactly as for the diff command, a %f is required in your commit commands, unless you know for sure that you will never ever work on a subproject. But you never know that. Besides, you should always also provide either a %s or a %S, unless your archival software does not support log messages. I'm not actually sure such a beast exists.

As an example, here is the commit command for the Git built-in theme (see Themes): ‘git commit %!f{-a }-F %s%?f{ -- }%f