The diff command used to generate the patch is specified by the
:diff-command
project option. You can also punctually change this
command by calling patcher-mail-diff
with a prefix argument.
Patcher will then prompt you for a new command and use it exclusively
for this particular patch.
By the way, don't use the prefix argument of patcher-mail-diff
as
a way to specify files (that is work on a subproject). It is not meant
for that. It is meant only to modify the diff command for this instance
only, not the files to which it applies.
The diff command is in fact a template string that supports dynamic expansion for a set of special constructs. The following ones are currently available.
%n
%N
:name
option, use %N
instead of %n
.
%f
%?f{STR}
%!f{STR}
Here is an example to clarify this: the default diff command for Git in the ‘git’ built-in theme (see Themes) is the following:
‘git diff --no-prefix HEAD%?f{ -- }%f’
One important note: all diff commands in Patcher must have a ‘%f’ construct somewhere, even if you always perform global diffs only (but in fact, you never really know that for sure). The reason is that there are situations in which Patcher may need to diff specific files, even for a global diff.
See also More On Commands for cases where a diff command would fail.