Home Explore Blog CI



git

5th chunk of `Documentation/git-format-patch.adoc`
63a4f93ea0457a44a321f495177a9273e6787c3e292e21600000000100000fa4

--add-header=<header>::
	Add an arbitrary header to the email headers.  This is in addition
	to any configured headers, and may be used multiple times.
	For example, `--add-header="Organization: git-foo"`.
	The negated form `--no-add-header` discards *all* (`To:`,
	`Cc:`, and custom) headers added so far from config or command
	line.

--[no-]cover-letter::
	In addition to the patches, generate a cover letter file
	containing the branch description, shortlog and the overall diffstat.  You can
	fill in a description in the file before sending it out.

--encode-email-headers::
--no-encode-email-headers::
	Encode email headers that have non-ASCII characters with
	"Q-encoding" (described in RFC 2047), instead of outputting the
	headers verbatim. Defaults to the value of the
	`format.encodeEmailHeaders` configuration variable.

--interdiff=<previous>::
	As a reviewer aid, insert an interdiff into the cover letter,
	or as commentary of the lone patch of a 1-patch series, showing
	the differences between the previous version of the patch series and
	the series currently being formatted. `previous` is a single revision
	naming the tip of the previous series which shares a common base with
	the series being formatted (for example `git format-patch
	--cover-letter --interdiff=feature/v1 -3 feature/v2`).

--range-diff=<previous>::
	As a reviewer aid, insert a range-diff (see linkgit:git-range-diff[1])
	into the cover letter, or as commentary of the lone patch of a
	1-patch series, showing the differences between the previous
	version of the patch series and the series currently being formatted.
	`previous` can be a single revision naming the tip of the previous
	series if it shares a common base with the series being formatted (for
	example `git format-patch --cover-letter --range-diff=feature/v1 -3
	feature/v2`), or a revision range if the two versions of the series are
	disjoint (for example `git format-patch --cover-letter
	--range-diff=feature/v1~3..feature/v1 -3 feature/v2`).
+
Note that diff options passed to the command affect how the primary
product of `format-patch` is generated, and they are not passed to
the underlying `range-diff` machinery used to generate the cover-letter
material (this may change in the future).

--creation-factor=<percent>::
	Used with `--range-diff`, tweak the heuristic which matches up commits
	between the previous and current series of patches by adjusting the
	creation/deletion cost fudge factor. See linkgit:git-range-diff[1])
	for details.
+
Defaults to 999 (the linkgit:git-range-diff[1] uses 60), as the use
case is to show comparison with an older iteration of the same
topic and the tool should find more correspondence between the two
sets of patches.

--notes[=<ref>]::
--no-notes::
	Append the notes (see linkgit:git-notes[1]) for the commit
	after the three-dash line.
+
The expected use case of this is to write supporting explanation for
the commit that does not belong to the commit log message proper,
and include it with the patch submission. While one can simply write
these explanations after `format-patch` has run but before sending,
keeping them as Git notes allows them to be maintained between versions
of the patch series (but see the discussion of the `notes.rewrite`
configuration options in linkgit:git-notes[1] to use this workflow).
+
The default is `--no-notes`, unless the `format.notes` configuration is
set.

--[no-]signature=<signature>::
	Add a signature to each message produced. Per RFC 3676 the signature
	is separated from the body by a line with '-- ' on it. If the
	signature option is omitted the signature defaults to the Git version
	number.

--signature-file=<file>::
	Works just like --signature except the signature is read from a file.

--suffix=.<sfx>::
	Instead of using `.patch` as the suffix for generated
	filenames, use specified suffix.  A common alternative is
	`--suffix=.txt`.  Leaving this empty will remove the `.patch`
	suffix.
+
Note that the leading character does not have

Title: Git Format Patch Additional Options
Summary
The git-format-patch command provides additional options for customizing the output, including adding arbitrary headers, generating cover letters, encoding email headers, and inserting interdiffs and range diffs, as well as options for appending notes, adding signatures, and specifying filename suffixes.