Skip to content

Commit 1703314

Browse files
committed
docs: Normalize quoting for option references
Use single quotes in all about and help strings.
1 parent ac22351 commit 1703314

File tree

12 files changed

+74
-74
lines changed

12 files changed

+74
-74
lines changed

src/cmd/branch.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ fn make() -> clap::Command {
150150
.long_about(
151151
"Delete a branch.\n\
152152
\n\
153-
The branch will not be deleted if there are any patches remaining unless \
154-
the --force option is provided.\n\
153+
The branch will not be deleted if there are any patches remaining \
154+
unless the '--force' option is provided.\n\
155155
\n\
156156
A protected branch may not be deleted; it must be unprotected first.",
157157
)
@@ -175,7 +175,7 @@ fn make() -> clap::Command {
175175
.about("Remove StGit patch stack from branch")
176176
.long_about(
177177
"Remove StGit patch stack from branch. The operation will be refused if \
178-
any patches remain, unless the --force option is provided.\n\
178+
any patches remain, unless the '--force' option is provided.\n\
179179
\n\
180180
A protected branch will not be cleaned up; it must be unprotected first.\n\
181181
\n\

src/cmd/completion/man.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub(super) fn command() -> clap::Command {
2020
other output formats.\n\
2121
\n\
2222
One file is generated for each `stg` command. The output directory \
23-
defaults to the current directory, but may be specified with `--output`. \
23+
defaults to the current directory, but may be specified with '--output'. \
2424
The output files are named `stg-<command>.txt`.",
2525
)
2626
.arg(

src/cmd/email/format.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub(super) fn command() -> clap::Command {
2424
email's body.\n\
2525
\n\
2626
The patches to format may be specified as individual patch names or patch \
27-
ranges of the form 'p0..p3', or --all may be used to format all applied \
27+
ranges of the form 'p0..p3', or '--all' may be used to format all applied \
2828
patches. Note that the specified patches must be contiguous within the \
2929
patch series.\n\
3030
\n\
@@ -34,13 +34,13 @@ pub(super) fn command() -> clap::Command {
3434
all the email files individually.\n\
3535
\n\
3636
A cover letter template may also be generated by specifying \
37-
--cover-letter. A cover letter is recommended when sending multiple \
37+
'--cover-letter'. A cover letter is recommended when sending multiple \
3838
patches. The `format.coverLetter` configuration value may be set true to \
3939
always generate a cover letter or 'auto' to generate a cover letter when \
4040
formatting more than one patch.\n\
4141
\n\
42-
Recipients may be specified using the --to and --cc, or setting recipients \
43-
may be deferred to `stg email send`.\n\
42+
Recipients may be specified using the '--to' and '--cc', or setting \
43+
recipients may be deferred to `stg email send`.\n\
4444
\n\
4545
Many aspects of the format behavior may be controlled via `format.*` \
4646
configuration values. Refer to the git-config(1) and git-format-patch(1) \
@@ -136,11 +136,11 @@ fn format_options() -> Vec<Arg> {
136136
"Mark the series as the <n>-th iteration of the topic. The output \
137137
filenames have \"v<n>\" prepended to them, and the subject prefix \
138138
(\"PATCH\" by default, but configurable via the --subject-prefix \
139-
option) has ` v<N>` appended to it. E.g. --reroll-count=4 may produce \
140-
v4-0001-add-makefile.patch file that has \"Subject: [PATCH v4 1/20] \
141-
Add makefile\" in it. <N> does not have to be an integer (e.g. \
142-
\"--reroll-count=4.4\", or \"--reroll-count=4rev2\" are allowed), but \
143-
the downside of using such a reroll-count is that the \
139+
option) has ` v<N>` appended to it. E.g. '--reroll-count=4' may \
140+
produce v4-0001-add-makefile.patch file that has \"Subject: [PATCH v4
141+
1/20] Add makefile\" in it. <N> does not have to be an integer (e.g. \
142+
'--reroll-count=4.4', or '--reroll-count=4rev2' are allowed), but the \
143+
downside of using such a reroll-count is that the \
144144
range-diff/interdiff with the previous version does not state exactly \
145145
which version the new interation is compared against.",
146146
)
@@ -150,7 +150,7 @@ fn format_options() -> Vec<Arg> {
150150
.long("rfc")
151151
.help("Use [RFC PATCH] instead of [PATCH]")
152152
.long_help(
153-
"Alias for --subject-prefix=\"RFC PATCH\". RFC means \"Request For \
153+
"Alias for '--subject-prefix=\"RFC PATCH\"'. RFC means \"Request For \
154154
Comments\"; use this when sending an experimental patch for \
155155
discussion rather than application.",
156156
)
@@ -161,7 +161,7 @@ fn format_options() -> Vec<Arg> {
161161
.long_help(
162162
"Instead of the standard `[PATCH]` prefix in the subject line, instead \
163163
use `[<prefix>]`. This allows for useful naming of a patch series, \
164-
and can be combined with the `--numbered` option.",
164+
and can be combined with the '--numbered' option.",
165165
)
166166
.value_name("prefix")
167167
.num_args(1),
@@ -192,7 +192,7 @@ fn format_options() -> Vec<Arg> {
192192
.help("Use <suffix> instead of '.patch'")
193193
.long_help(
194194
"Instead of using `.patch` as the suffix for generated filenames, use \
195-
specified suffix. A common alternative is `--suffix=.txt`. Leaving \
195+
specified suffix. A common alternative is '--suffix=.txt'. Leaving \
196196
this empty will remove the `.patch` suffix.",
197197
)
198198
.value_name("suffix")
@@ -239,7 +239,7 @@ fn message_options() -> Vec<Arg> {
239239
.long_help(
240240
"Add a `To:` header to the email headers. This is in addition to any \
241241
configured headers, and may be used multiple times. The negated form \
242-
`--no-to` discards all `To:` headers added so far (from config or \
242+
'--no-to' discards all `To:` headers added so far (from config or \
243243
command line).",
244244
)
245245
.value_name("address")
@@ -258,7 +258,7 @@ fn message_options() -> Vec<Arg> {
258258
.long_help(
259259
"Add a `Cc:` header to the email headers. This is in addition to any \
260260
configured headers, and may be used multiple times. The negated form \
261-
`--no-cc` discards all `Cc:` headers added so far (from config or \
261+
'--no-cc' discards all `Cc:` headers added so far (from config or \
262262
command line).",
263263
)
264264
.value_name("address")
@@ -275,7 +275,7 @@ fn message_options() -> Vec<Arg> {
275275
.long("in-reply-to")
276276
.help("Make first mail a reply to <message-id>")
277277
.long_help(
278-
"Make the first mail (or all the mails with `--no-thread`) appear as a \
278+
"Make the first mail (or all the mails with '--no-thread') appear as a \
279279
reply to the given <message-id>, which avoids breaking threads to \
280280
provide a new patch series.",
281281
)
@@ -288,8 +288,8 @@ fn message_options() -> Vec<Arg> {
288288
.long_help(
289289
"Add an arbitrary header to the email headers. This is in addition to \
290290
any configured headers, and may be used multiple times. For example, \
291-
`--add-header=\"Organization: git-foo\"`.",
292-
// "The negated form `--no-add-header` discards all (`To:`, `Cc:`, \
291+
'--add-header=\"Organization: git-foo\"'.",
292+
// "The negated form '--no-add-header' discards all (`To:`, `Cc:`, \
293293
// and custom) headers added so far from config or command line."
294294
)
295295
.value_name("header")
@@ -327,11 +327,11 @@ fn message_options() -> Vec<Arg> {
327327
The optional <style> argument can be either `shallow` or `deep`. \
328328
`shallow` threading makes every mail a reply to the head of the \
329329
series, where the head is chosen from the cover letter, the \
330-
`--in-reply-to`, and the first patch mail, in this order. `deep` \
330+
'--in-reply-to', and the first patch mail, in this order. `deep` \
331331
threading makes every mail a reply to the previous one.\n\
332332
\n\
333-
The default is `--no-thread`, unless the `format.thread` \
334-
configuration is set. If `--thread` is specified without a style, it \
333+
The default is '--no-thread', unless the `format.thread` \
334+
configuration is set. If '--thread' is specified without a style, it \
335335
defaults to the style specified by `format.thread` if any, or else \
336336
`shallow`.\n\
337337
\n\
@@ -355,7 +355,7 @@ fn message_options() -> Vec<Arg> {
355355
.long_help(
356356
"Add a signature string to each email. The default signature is the \
357357
git version number, or the `format.signature` configuration value, if \
358-
specified. The signature may be disabled with `--no-signature`",
358+
specified. The signature may be disabled with '--no-signature'",
359359
)
360360
.num_args(1)
361361
.value_name("signature")
@@ -367,7 +367,7 @@ fn message_options() -> Vec<Arg> {
367367
Arg::new("signature-file")
368368
.long("signature-file")
369369
.help("Add a signature from a file")
370-
.long_help("Like `--signature` except the signature is read from a file.")
370+
.long_help("Like '--signature' except the signature is read from a file.")
371371
.num_args(1)
372372
.value_name("file")
373373
.value_hint(clap::ValueHint::FilePath),
@@ -425,7 +425,7 @@ fn message_options() -> Vec<Arg> {
425425
.long("creation-factor")
426426
.help("Percentage by which creation is weighed")
427427
.long_help(
428-
"Used with `--range-diff`, tweak the heuristic which matches up \
428+
"Used with '--range-diff', tweak the heuristic which matches up \
429429
commits between the previous and current series of patches by \
430430
adjusting the creation/deletion cost fudge factor. See \
431431
git-range-diff(1)) for details.",

src/cmd/email/send.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ fn compose_options() -> Vec<Arg> {
124124
"Specify the primary recipient of the emails generated. Generally, \
125125
this will be the upstream maintainer of the project involved. Default \
126126
is the value of the sendemail.to configuration value; if that is \
127-
unspecified, and --to-cmd is not specified, this will be prompted \
127+
unspecified, and '--to-cmd' is not specified, this will be prompted \
128128
for.\n\
129129
\n\
130130
This option may be specified multiple times.",
@@ -167,8 +167,8 @@ fn compose_options() -> Vec<Arg> {
167167
.help("Specify email \"Subject:\"")
168168
.long_help(
169169
"Specify the initial subject of the email thread. Only necessary if \
170-
--compose is also set. If --compose is not set, this will be prompted \
171-
for.",
170+
'--compose' is also set. If '--compose' is not set, this will be \
171+
prompted for.",
172172
)
173173
.value_name("subject")
174174
.num_args(1)
@@ -179,7 +179,7 @@ fn compose_options() -> Vec<Arg> {
179179
.long_help(
180180
"Specify the address where replies from recipients should go to. Use \
181181
this if replies to messages should go to another address than what is \
182-
specified with the --from parameter.",
182+
specified with the '--from' parameter.",
183183
)
184184
.value_name("address")
185185
.num_args(1)
@@ -189,15 +189,15 @@ fn compose_options() -> Vec<Arg> {
189189
.long("in-reply-to")
190190
.help("Specify the \"In-Reply-To:\" identifier")
191191
.long_help(
192-
"Make the first mail (or all the mails with --no-thread) appear as a \
192+
"Make the first mail (or all the mails with '--no-thread') appear as a \
193193
reply to the given Message-Id, which avoids breaking threads to \
194194
provide a new patch series. The second and subsequent emails will be \
195-
sent as replies according to the --[no-]chain-reply-to setting.\n\
195+
sent as replies according to the '--[no-]chain-reply-to' setting.\n\
196196
\n\
197-
So for example when --thread and --no-chain-reply-to are specified, \
198-
the second and subsequent patches will be replies to the first one \
199-
like in the illustration below where [PATCH v2 0/3] is in reply to \
200-
[PATCH 0/2]:\n\
197+
So for example when '--thread' and '--no-chain-reply-to' are \
198+
specified, the second and subsequent patches will be replies to the \
199+
first one like in the illustration below where [PATCH v2 0/3] is in \
200+
reply to [PATCH 0/2]:\n\
201201
\n [PATCH 0/2] Here is what I did...\
202202
\n [PATCH 1/2] Clean up and tests\
203203
\n [PATCH 2/2] Implementation\
@@ -206,7 +206,7 @@ fn compose_options() -> Vec<Arg> {
206206
\n [PATCH v2 2/3] New tests\
207207
\n [PATCH v2 3/3] Implementation\
208208
\n\n\
209-
Only necessary if --compose is also set. If --compose is not set, \
209+
Only necessary if '--compose' is also set. If '--compose' is not set, \
210210
this will be prompted for.",
211211
)
212212
.value_name("id")
@@ -219,7 +219,7 @@ fn compose_options() -> Vec<Arg> {
219219
"Invoke a text editor (see GIT_EDITOR in git-var(1)) to edit an \
220220
introductory message for the patch series.\n\
221221
\n\
222-
When --compose is used, git send-email will use the From, Subject, \
222+
When '--compose' is used, git send-email will use the From, Subject, \
223223
and In-Reply-To headers specified in the message. If the body of the \
224224
message (what you type after the headers and a blank line) only \
225225
contains blank (or Git: prefixed) lines, the summary will not be \
@@ -265,12 +265,12 @@ fn automate_options() -> Vec<Arg> {
265265
be added to each email sent. Whether each mail refers to the previous \
266266
email (deep threading per `git format-patch` wording) or to the first \
267267
email (shallow threading) is governed by \
268-
\"--[no-]chain-reply-to\".\n\
268+
'--[no-]chain-reply-to'.\n\
269269
\n\
270-
If disabled with \"--no-thread\", those headers will not be added \
271-
(unless specified with --in-reply-to). Default is the value of the \
270+
If disabled with '--no-thread', those headers will not be added \
271+
(unless specified with '--in-reply-to'). Default is the value of the \
272272
sendemail.thread configuration value; if that is unspecified, default \
273-
to --thread.\n\
273+
to '--thread'.\n\
274274
\n\
275275
It is up to the user to ensure that no In-Reply-To header already \
276276
exists when `git send-email` is asked to add it (especially note that \

src/cmd/export.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn make() -> clap::Command {
3636
"Export a range of patches to a given directory in unified diff format. \
3737
All applied patches are exported by default.\n\
3838
\n\
39-
Patches are exported to 'patches-<branch>' by default. The --dir option \
39+
Patches are exported to 'patches-<branch>' by default. The '--dir' option \
4040
may be used to specify a different output directory.\n\
4141
\n\
4242
The patch file output may be customized via a template file found at \

src/cmd/fold.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ fn make() -> clap::Command {
2424
clap::Command::new(STGIT_COMMAND.name)
2525
.about("Fold diff file into the current patch")
2626
.long_about(
27-
"Fold diff file into the current patch. The given GNU diff file (or standard input) \
28-
is applied onto the current patch.\n\
27+
"Fold diff file into the current patch. The given GNU diff file (or \
28+
standard input) is applied onto the current patch.\n\
2929
\n\
30-
With the --threeway option, the diff is applied onto the bottom of the current patch \
31-
and a three-way merge is performed with the current top. With the --base option, the \
32-
diff is applied onto the specified base and a three-way merge is performed with the \
33-
current top.",
30+
With the '--threeway' option, the diff is applied onto the bottom of the \
31+
current patch and a three-way merge is performed with the current top. \
32+
With the '--base' option, the diff is applied onto the specified base and \
33+
a three-way merge is performed with the current top.",
3434
)
3535
.arg(
3636
Arg::new("file")

src/cmd/import.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ fn make() -> clap::Command {
3535
\n\
3636
The simplest usage is to import a diff/patch file into the stack from a \
3737
local file. By default, the file name is used as the patch name, but this \
38-
can be overridden with --name. The patch can either be a normal file with \
39-
the description at the top, or it can have standard mail format. The \
38+
can be overridden with '--name'. The patch can either be a normal file \
39+
with the description at the top, or it can have standard mail format. The \
4040
\"Subject\", \"From\", and \"Date\" headers will be used for the imported \
4141
patch's author details.\n\
4242
\n\
@@ -70,8 +70,8 @@ fn make() -> clap::Command {
7070
.help("Source of patches to import")
7171
.long_help(
7272
"Source of patches to import. May be a path to a local file or a \
73-
URL if the --url option is provided. The default is to read from \
74-
stdin if no source argument is provided.",
73+
URL if the '--url' option is provided. The default is to read \
74+
from stdin if no source argument is provided.",
7575
)
7676
.value_parser(clap::value_parser!(PathBuf))
7777
.value_hint(clap::ValueHint::AnyPath),
@@ -185,8 +185,8 @@ fn make() -> clap::Command {
185185
.long_help(
186186
"Create Message-Id trailer in patch description based on the \
187187
Message-ID email header. This option is applicable when importing \
188-
with --mail or --mbox. This behavior may also be enabled via the \
189-
\"stgit.import.message-id\" configuration option.",
188+
with '--mail' or '--mbox'. This behavior may also be enabled via \
189+
the \"stgit.import.message-id\" configuration option.",
190190
)
191191
.action(clap::ArgAction::SetTrue),
192192
);

0 commit comments

Comments
 (0)