Skip to content

Commit dce5ef1

Browse files
bjornggitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d4cb003 commit dce5ef1

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

Documentation/diff-options.txt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ endif::git-format-patch[]
2929
Generate diffs with <n> lines of context instead of
3030
the usual three.
3131
ifndef::git-format-patch[]
32-
Implies "-p".
32+
Implies `-p`.
3333
endif::git-format-patch[]
3434

3535
ifndef::git-format-patch[]
@@ -40,54 +40,54 @@ endif::git-format-patch[]
4040

4141
ifndef::git-format-patch[]
4242
--patch-with-raw::
43-
Synonym for "-p --raw".
43+
Synonym for `-p --raw`.
4444
endif::git-format-patch[]
4545

4646
--patience::
4747
Generate a diff using the "patience diff" algorithm.
4848

4949
--stat[=width[,name-width]]::
5050
Generate a diffstat. You can override the default
51-
output width for 80-column terminal by "--stat=width".
51+
output width for 80-column terminal by `--stat=width`.
5252
The width of the filename part can be controlled by
5353
giving another width to it separated by a comma.
5454

5555
--numstat::
56-
Similar to \--stat, but shows number of added and
56+
Similar to `\--stat`, but shows number of added and
5757
deleted lines in decimal notation and pathname without
5858
abbreviation, to make it more machine friendly. For
5959
binary files, outputs two `-` instead of saying
6060
`0 0`.
6161

6262
--shortstat::
63-
Output only the last line of the --stat format containing total
63+
Output only the last line of the `--stat` format containing total
6464
number of modified files, as well as number of added and deleted
6565
lines.
6666

6767
--dirstat[=limit]::
6868
Output the distribution of relative amount of changes (number of lines added or
6969
removed) for each sub-directory. Directories with changes below
7070
a cut-off percent (3% by default) are not shown. The cut-off percent
71-
can be set with "--dirstat=limit". Changes in a child directory is not
72-
counted for the parent directory, unless "--cumulative" is used.
71+
can be set with `--dirstat=limit`. Changes in a child directory is not
72+
counted for the parent directory, unless `--cumulative` is used.
7373

7474
--dirstat-by-file[=limit]::
75-
Same as --dirstat, but counts changed files instead of lines.
75+
Same as `--dirstat`, but counts changed files instead of lines.
7676

7777
--summary::
7878
Output a condensed summary of extended header information
7979
such as creations, renames and mode changes.
8080

8181
ifndef::git-format-patch[]
8282
--patch-with-stat::
83-
Synonym for "-p --stat".
83+
Synonym for `-p --stat`.
8484
endif::git-format-patch[]
8585

8686
ifndef::git-format-patch[]
8787
-z::
88-
NUL-line termination on output. This affects the --raw
88+
NUL-line termination on output. This affects the `--raw`
8989
output field terminator. Also output from commands such
90-
as "git-log" will be delimited with NUL between commits.
90+
as `git-log` will be delimited with NUL between commits.
9191

9292
--name-only::
9393
Show only names of changed files.
@@ -139,16 +139,16 @@ endif::git-format-patch[]
139139
line when generating patch format output.
140140

141141
--binary::
142-
In addition to --full-index, output "binary diff" that
143-
can be applied with "git apply".
142+
In addition to `--full-index`, output a binary diff that
143+
can be applied with `git-apply`.
144144

145145
--abbrev[=<n>]::
146146
Instead of showing the full 40-byte hexadecimal object
147147
name in diff-raw format output and diff-tree header
148148
lines, show only a partial prefix. This is
149-
independent of --full-index option above, which controls
149+
independent of the `--full-index` option above, which controls
150150
the diff-patch output format. Non default number of
151-
digits can be specified with --abbrev=<n>.
151+
digits can be specified with `--abbrev=<n>`.
152152

153153
-B::
154154
Break complete rewrite changes into pairs of delete and create.
@@ -183,7 +183,7 @@ endif::git-format-patch[]
183183
`-C` option has the same effect.
184184

185185
-l<num>::
186-
-M and -C options require O(n^2) processing time where n
186+
The `-M` and `-C` options require O(n^2) processing time where n
187187
is the number of potential rename/copy targets. This
188188
option prevents rename/copy detection from running if
189189
the number of rename/copy targets exceeds the specified
@@ -197,7 +197,7 @@ ifndef::git-format-patch[]
197197
linkgit:gitdiffcore[7] for more details.
198198

199199
--pickaxe-all::
200-
When -S finds a change, show all the changes in that
200+
When `-S` finds a change, show all the changes in that
201201
changeset, not just the files that contain the change
202202
in <string>.
203203

@@ -254,7 +254,7 @@ ifndef::git-format-patch[]
254254
0 means no differences.
255255

256256
--quiet::
257-
Disable all output of the program. Implies --exit-code.
257+
Disable all output of the program. Implies `--exit-code`.
258258
endif::git-format-patch[]
259259

260260
--ext-diff::

Documentation/git-format-patch.txt

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,28 @@ There are two ways to specify which commits to operate on.
4343

4444
The first rule takes precedence in the case of a single <commit>. To
4545
apply the second rule, i.e., format everything since the beginning of
46-
history up until <commit>, use the '\--root' option: "git format-patch
47-
\--root <commit>". If you want to format only <commit> itself, you
48-
can do this with "git format-patch -1 <commit>".
46+
history up until <commit>, use the '\--root' option: `git format-patch
47+
\--root <commit>`. If you want to format only <commit> itself, you
48+
can do this with `git format-patch -1 <commit>`.
4949

5050
By default, each output file is numbered sequentially from 1, and uses the
5151
first line of the commit message (massaged for pathname safety) as
52-
the filename. With the --numbered-files option, the output file names
52+
the filename. With the `--numbered-files` option, the output file names
5353
will only be numbers, without the first line of the commit appended.
5454
The names of the output files are printed to standard
55-
output, unless the --stdout option is specified.
55+
output, unless the `--stdout` option is specified.
5656

57-
If -o is specified, output files are created in <dir>. Otherwise
57+
If `-o` is specified, output files are created in <dir>. Otherwise
5858
they are created in the current working directory.
5959

6060
By default, the subject of a single patch is "[PATCH] First Line" and
6161
the subject when multiple patches are output is "[PATCH n/m] First
62-
Line". To force 1/1 to be added for a single patch, use -n. To omit
63-
patch numbers from the subject, use -N
62+
Line". To force 1/1 to be added for a single patch, use `-n`. To omit
63+
patch numbers from the subject, use `-N`.
6464

65-
If given --thread, 'git-format-patch' will generate In-Reply-To and
66-
References headers to make the second and subsequent patch mails appear
67-
as replies to the first mail; this also generates a Message-Id header to
65+
If given `--thread`, `git-format-patch` will generate `In-Reply-To` and
66+
`References` headers to make the second and subsequent patch mails appear
67+
as replies to the first mail; this also generates a `Message-Id` header to
6868
reference.
6969

7070
OPTIONS
@@ -112,7 +112,7 @@ include::diff-options.txt[]
112112
--attach[=<boundary>]::
113113
Create multipart/mixed attachment, the first part of
114114
which is the commit message and the patch itself in the
115-
second part, with "Content-Disposition: attachment".
115+
second part, with `Content-Disposition: attachment`.
116116

117117
--no-attach::
118118
Disable the creation of an attachment, overriding the
@@ -121,13 +121,13 @@ include::diff-options.txt[]
121121
--inline[=<boundary>]::
122122
Create multipart/mixed attachment, the first part of
123123
which is the commit message and the patch itself in the
124-
second part, with "Content-Disposition: inline".
124+
second part, with `Content-Disposition: inline`.
125125

126126
--thread[=<style>]::
127127
--no-thread::
128-
Controls addition of In-Reply-To and References headers to
128+
Controls addition of `In-Reply-To` and `References` headers to
129129
make the second and subsequent mails appear as replies to the
130-
first. Also controls generation of the Message-Id header to
130+
first. Also controls generation of the `Message-Id` header to
131131
reference.
132132
+
133133
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
136136
`\--in-reply-to`, and the first patch mail, in this order. 'deep'
137137
threading makes every mail a reply to the previous one.
138138
+
139-
The default is --no-thread, unless the 'format.thread' configuration
140-
is set. If --thread is specified without a style, it defaults to the
139+
The default is `--no-thread`, unless the 'format.thread' configuration
140+
is set. If `--thread` is specified without a style, it defaults to the
141141
style specified by 'format.thread' if any, or else `shallow`.
142142
+
143143
Beware that the default for 'git send-email' is to thread emails
144-
itself. If you want 'git format-patch' to take care of hreading, you
145-
will want to ensure that threading is disabled for 'git send-email'.
144+
itself. If you want `git format-patch` to take care of threading, you
145+
will want to ensure that threading is disabled for `git send-email`.
146146

147147
--in-reply-to=Message-Id::
148-
Make the first mail (or all the mails with --no-thread) appear as a
148+
Make the first mail (or all the mails with `--no-thread`) appear as a
149149
reply to the given Message-Id, which avoids breaking threads to
150150
provide a new patch series.
151151

@@ -160,16 +160,16 @@ will want to ensure that threading is disabled for 'git send-email'.
160160
Instead of the standard '[PATCH]' prefix in the subject
161161
line, instead use '[<Subject-Prefix>]'. This
162162
allows for useful naming of a patch series, and can be
163-
combined with the --numbered option.
163+
combined with the `--numbered` option.
164164

165165
--cc=<email>::
166-
Add a "Cc:" header to the email headers. This is in addition
166+
Add a `Cc:` header to the email headers. This is in addition
167167
to any configured headers, and may be used multiple times.
168168

169169
--add-header=<header>::
170170
Add an arbitrary header to the email headers. This is in addition
171171
to any configured headers, and may be used multiple times.
172-
For example, --add-header="Organization: git-foo"
172+
For example, `--add-header="Organization: git-foo"`
173173

174174
--cover-letter::
175175
In addition to the patches, generate a cover letter file

0 commit comments

Comments
 (0)