mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
format-patch documentation: Fix formatting
Format git commands and options consistently using back quotes (i.e. a fixed font in the resulting HTML document). Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
d4cb003fff
commit
dce5ef1420
|
@ -29,7 +29,7 @@ endif::git-format-patch[]
|
||||||
Generate diffs with <n> lines of context instead of
|
Generate diffs with <n> lines of context instead of
|
||||||
the usual three.
|
the usual three.
|
||||||
ifndef::git-format-patch[]
|
ifndef::git-format-patch[]
|
||||||
Implies "-p".
|
Implies `-p`.
|
||||||
endif::git-format-patch[]
|
endif::git-format-patch[]
|
||||||
|
|
||||||
ifndef::git-format-patch[]
|
ifndef::git-format-patch[]
|
||||||
|
@ -40,7 +40,7 @@ endif::git-format-patch[]
|
||||||
|
|
||||||
ifndef::git-format-patch[]
|
ifndef::git-format-patch[]
|
||||||
--patch-with-raw::
|
--patch-with-raw::
|
||||||
Synonym for "-p --raw".
|
Synonym for `-p --raw`.
|
||||||
endif::git-format-patch[]
|
endif::git-format-patch[]
|
||||||
|
|
||||||
--patience::
|
--patience::
|
||||||
|
@ -48,19 +48,19 @@ endif::git-format-patch[]
|
||||||
|
|
||||||
--stat[=width[,name-width]]::
|
--stat[=width[,name-width]]::
|
||||||
Generate a diffstat. You can override the default
|
Generate a diffstat. You can override the default
|
||||||
output width for 80-column terminal by "--stat=width".
|
output width for 80-column terminal by `--stat=width`.
|
||||||
The width of the filename part can be controlled by
|
The width of the filename part can be controlled by
|
||||||
giving another width to it separated by a comma.
|
giving another width to it separated by a comma.
|
||||||
|
|
||||||
--numstat::
|
--numstat::
|
||||||
Similar to \--stat, but shows number of added and
|
Similar to `\--stat`, but shows number of added and
|
||||||
deleted lines in decimal notation and pathname without
|
deleted lines in decimal notation and pathname without
|
||||||
abbreviation, to make it more machine friendly. For
|
abbreviation, to make it more machine friendly. For
|
||||||
binary files, outputs two `-` instead of saying
|
binary files, outputs two `-` instead of saying
|
||||||
`0 0`.
|
`0 0`.
|
||||||
|
|
||||||
--shortstat::
|
--shortstat::
|
||||||
Output only the last line of the --stat format containing total
|
Output only the last line of the `--stat` format containing total
|
||||||
number of modified files, as well as number of added and deleted
|
number of modified files, as well as number of added and deleted
|
||||||
lines.
|
lines.
|
||||||
|
|
||||||
|
@ -68,11 +68,11 @@ endif::git-format-patch[]
|
||||||
Output the distribution of relative amount of changes (number of lines added or
|
Output the distribution of relative amount of changes (number of lines added or
|
||||||
removed) for each sub-directory. Directories with changes below
|
removed) for each sub-directory. Directories with changes below
|
||||||
a cut-off percent (3% by default) are not shown. The cut-off percent
|
a cut-off percent (3% by default) are not shown. The cut-off percent
|
||||||
can be set with "--dirstat=limit". Changes in a child directory is not
|
can be set with `--dirstat=limit`. Changes in a child directory is not
|
||||||
counted for the parent directory, unless "--cumulative" is used.
|
counted for the parent directory, unless `--cumulative` is used.
|
||||||
|
|
||||||
--dirstat-by-file[=limit]::
|
--dirstat-by-file[=limit]::
|
||||||
Same as --dirstat, but counts changed files instead of lines.
|
Same as `--dirstat`, but counts changed files instead of lines.
|
||||||
|
|
||||||
--summary::
|
--summary::
|
||||||
Output a condensed summary of extended header information
|
Output a condensed summary of extended header information
|
||||||
|
@ -80,14 +80,14 @@ endif::git-format-patch[]
|
||||||
|
|
||||||
ifndef::git-format-patch[]
|
ifndef::git-format-patch[]
|
||||||
--patch-with-stat::
|
--patch-with-stat::
|
||||||
Synonym for "-p --stat".
|
Synonym for `-p --stat`.
|
||||||
endif::git-format-patch[]
|
endif::git-format-patch[]
|
||||||
|
|
||||||
ifndef::git-format-patch[]
|
ifndef::git-format-patch[]
|
||||||
-z::
|
-z::
|
||||||
NUL-line termination on output. This affects the --raw
|
NUL-line termination on output. This affects the `--raw`
|
||||||
output field terminator. Also output from commands such
|
output field terminator. Also output from commands such
|
||||||
as "git-log" will be delimited with NUL between commits.
|
as `git-log` will be delimited with NUL between commits.
|
||||||
|
|
||||||
--name-only::
|
--name-only::
|
||||||
Show only names of changed files.
|
Show only names of changed files.
|
||||||
|
@ -139,16 +139,16 @@ endif::git-format-patch[]
|
||||||
line when generating patch format output.
|
line when generating patch format output.
|
||||||
|
|
||||||
--binary::
|
--binary::
|
||||||
In addition to --full-index, output "binary diff" that
|
In addition to `--full-index`, output a binary diff that
|
||||||
can be applied with "git apply".
|
can be applied with `git-apply`.
|
||||||
|
|
||||||
--abbrev[=<n>]::
|
--abbrev[=<n>]::
|
||||||
Instead of showing the full 40-byte hexadecimal object
|
Instead of showing the full 40-byte hexadecimal object
|
||||||
name in diff-raw format output and diff-tree header
|
name in diff-raw format output and diff-tree header
|
||||||
lines, show only a partial prefix. This is
|
lines, show only a partial prefix. This is
|
||||||
independent of --full-index option above, which controls
|
independent of the `--full-index` option above, which controls
|
||||||
the diff-patch output format. Non default number of
|
the diff-patch output format. Non default number of
|
||||||
digits can be specified with --abbrev=<n>.
|
digits can be specified with `--abbrev=<n>`.
|
||||||
|
|
||||||
-B::
|
-B::
|
||||||
Break complete rewrite changes into pairs of delete and create.
|
Break complete rewrite changes into pairs of delete and create.
|
||||||
|
@ -183,7 +183,7 @@ endif::git-format-patch[]
|
||||||
`-C` option has the same effect.
|
`-C` option has the same effect.
|
||||||
|
|
||||||
-l<num>::
|
-l<num>::
|
||||||
-M and -C options require O(n^2) processing time where n
|
The `-M` and `-C` options require O(n^2) processing time where n
|
||||||
is the number of potential rename/copy targets. This
|
is the number of potential rename/copy targets. This
|
||||||
option prevents rename/copy detection from running if
|
option prevents rename/copy detection from running if
|
||||||
the number of rename/copy targets exceeds the specified
|
the number of rename/copy targets exceeds the specified
|
||||||
|
@ -197,7 +197,7 @@ ifndef::git-format-patch[]
|
||||||
linkgit:gitdiffcore[7] for more details.
|
linkgit:gitdiffcore[7] for more details.
|
||||||
|
|
||||||
--pickaxe-all::
|
--pickaxe-all::
|
||||||
When -S finds a change, show all the changes in that
|
When `-S` finds a change, show all the changes in that
|
||||||
changeset, not just the files that contain the change
|
changeset, not just the files that contain the change
|
||||||
in <string>.
|
in <string>.
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ ifndef::git-format-patch[]
|
||||||
0 means no differences.
|
0 means no differences.
|
||||||
|
|
||||||
--quiet::
|
--quiet::
|
||||||
Disable all output of the program. Implies --exit-code.
|
Disable all output of the program. Implies `--exit-code`.
|
||||||
endif::git-format-patch[]
|
endif::git-format-patch[]
|
||||||
|
|
||||||
--ext-diff::
|
--ext-diff::
|
||||||
|
|
|
@ -43,28 +43,28 @@ There are two ways to specify which commits to operate on.
|
||||||
|
|
||||||
The first rule takes precedence in the case of a single <commit>. To
|
The first rule takes precedence in the case of a single <commit>. To
|
||||||
apply the second rule, i.e., format everything since the beginning of
|
apply the second rule, i.e., format everything since the beginning of
|
||||||
history up until <commit>, use the '\--root' option: "git format-patch
|
history up until <commit>, use the '\--root' option: `git format-patch
|
||||||
\--root <commit>". If you want to format only <commit> itself, you
|
\--root <commit>`. If you want to format only <commit> itself, you
|
||||||
can do this with "git format-patch -1 <commit>".
|
can do this with `git format-patch -1 <commit>`.
|
||||||
|
|
||||||
By default, each output file is numbered sequentially from 1, and uses the
|
By default, each output file is numbered sequentially from 1, and uses the
|
||||||
first line of the commit message (massaged for pathname safety) as
|
first line of the commit message (massaged for pathname safety) as
|
||||||
the filename. With the --numbered-files option, the output file names
|
the filename. With the `--numbered-files` option, the output file names
|
||||||
will only be numbers, without the first line of the commit appended.
|
will only be numbers, without the first line of the commit appended.
|
||||||
The names of the output files are printed to standard
|
The names of the output files are printed to standard
|
||||||
output, unless the --stdout option is specified.
|
output, unless the `--stdout` option is specified.
|
||||||
|
|
||||||
If -o is specified, output files are created in <dir>. Otherwise
|
If `-o` is specified, output files are created in <dir>. Otherwise
|
||||||
they are created in the current working directory.
|
they are created in the current working directory.
|
||||||
|
|
||||||
By default, the subject of a single patch is "[PATCH] First Line" and
|
By default, the subject of a single patch is "[PATCH] First Line" and
|
||||||
the subject when multiple patches are output is "[PATCH n/m] First
|
the subject when multiple patches are output is "[PATCH n/m] First
|
||||||
Line". To force 1/1 to be added for a single patch, use -n. To omit
|
Line". To force 1/1 to be added for a single patch, use `-n`. To omit
|
||||||
patch numbers from the subject, use -N
|
patch numbers from the subject, use `-N`.
|
||||||
|
|
||||||
If given --thread, 'git-format-patch' will generate In-Reply-To and
|
If given `--thread`, `git-format-patch` will generate `In-Reply-To` and
|
||||||
References headers to make the second and subsequent patch mails appear
|
`References` headers to make the second and subsequent patch mails appear
|
||||||
as replies to the first mail; this also generates a Message-Id header to
|
as replies to the first mail; this also generates a `Message-Id` header to
|
||||||
reference.
|
reference.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
|
@ -112,7 +112,7 @@ include::diff-options.txt[]
|
||||||
--attach[=<boundary>]::
|
--attach[=<boundary>]::
|
||||||
Create multipart/mixed attachment, the first part of
|
Create multipart/mixed attachment, the first part of
|
||||||
which is the commit message and the patch itself in the
|
which is the commit message and the patch itself in the
|
||||||
second part, with "Content-Disposition: attachment".
|
second part, with `Content-Disposition: attachment`.
|
||||||
|
|
||||||
--no-attach::
|
--no-attach::
|
||||||
Disable the creation of an attachment, overriding the
|
Disable the creation of an attachment, overriding the
|
||||||
|
@ -121,13 +121,13 @@ include::diff-options.txt[]
|
||||||
--inline[=<boundary>]::
|
--inline[=<boundary>]::
|
||||||
Create multipart/mixed attachment, the first part of
|
Create multipart/mixed attachment, the first part of
|
||||||
which is the commit message and the patch itself in the
|
which is the commit message and the patch itself in the
|
||||||
second part, with "Content-Disposition: inline".
|
second part, with `Content-Disposition: inline`.
|
||||||
|
|
||||||
--thread[=<style>]::
|
--thread[=<style>]::
|
||||||
--no-thread::
|
--no-thread::
|
||||||
Controls addition of In-Reply-To and References headers to
|
Controls addition of `In-Reply-To` and `References` headers to
|
||||||
make the second and subsequent mails appear as replies to the
|
make the second and subsequent mails appear as replies to the
|
||||||
first. Also controls generation of the Message-Id header to
|
first. Also controls generation of the `Message-Id` header to
|
||||||
reference.
|
reference.
|
||||||
+
|
+
|
||||||
The optional <style> argument can be either `shallow` or `deep`.
|
The optional <style> argument can be either `shallow` or `deep`.
|
||||||
|
@ -136,16 +136,16 @@ series, where the head is chosen from the cover letter, the
|
||||||
`\--in-reply-to`, and the first patch mail, in this order. 'deep'
|
`\--in-reply-to`, and the first patch mail, in this order. 'deep'
|
||||||
threading makes every mail a reply to the previous one.
|
threading makes every mail a reply to the previous one.
|
||||||
+
|
+
|
||||||
The default is --no-thread, unless the 'format.thread' configuration
|
The default is `--no-thread`, unless the 'format.thread' configuration
|
||||||
is set. If --thread is specified without a style, it defaults to the
|
is set. If `--thread` is specified without a style, it defaults to the
|
||||||
style specified by 'format.thread' if any, or else `shallow`.
|
style specified by 'format.thread' if any, or else `shallow`.
|
||||||
+
|
+
|
||||||
Beware that the default for 'git send-email' is to thread emails
|
Beware that the default for 'git send-email' is to thread emails
|
||||||
itself. If you want 'git format-patch' to take care of hreading, you
|
itself. If you want `git format-patch` to take care of threading, you
|
||||||
will want to ensure that threading is disabled for 'git send-email'.
|
will want to ensure that threading is disabled for `git send-email`.
|
||||||
|
|
||||||
--in-reply-to=Message-Id::
|
--in-reply-to=Message-Id::
|
||||||
Make the first mail (or all the mails with --no-thread) appear as a
|
Make the first mail (or all the mails with `--no-thread`) appear as a
|
||||||
reply to the given Message-Id, which avoids breaking threads to
|
reply to the given Message-Id, which avoids breaking threads to
|
||||||
provide a new patch series.
|
provide a new patch series.
|
||||||
|
|
||||||
|
@ -160,16 +160,16 @@ will want to ensure that threading is disabled for 'git send-email'.
|
||||||
Instead of the standard '[PATCH]' prefix in the subject
|
Instead of the standard '[PATCH]' prefix in the subject
|
||||||
line, instead use '[<Subject-Prefix>]'. This
|
line, instead use '[<Subject-Prefix>]'. This
|
||||||
allows for useful naming of a patch series, and can be
|
allows for useful naming of a patch series, and can be
|
||||||
combined with the --numbered option.
|
combined with the `--numbered` option.
|
||||||
|
|
||||||
--cc=<email>::
|
--cc=<email>::
|
||||||
Add a "Cc:" header to the email headers. This is in addition
|
Add a `Cc:` header to the email headers. This is in addition
|
||||||
to any configured headers, and may be used multiple times.
|
to any configured headers, and may be used multiple times.
|
||||||
|
|
||||||
--add-header=<header>::
|
--add-header=<header>::
|
||||||
Add an arbitrary header to the email headers. This is in addition
|
Add an arbitrary header to the email headers. This is in addition
|
||||||
to any configured headers, and may be used multiple times.
|
to any configured headers, and may be used multiple times.
|
||||||
For example, --add-header="Organization: git-foo"
|
For example, `--add-header="Organization: git-foo"`
|
||||||
|
|
||||||
--cover-letter::
|
--cover-letter::
|
||||||
In addition to the patches, generate a cover letter file
|
In addition to the patches, generate a cover letter file
|
||||||
|
|
Loading…
Reference in a new issue