doc: check for absence of the form --[no-]parameter
For better searchability, this commit adds a check to ensure that parameters expressed in the form of `--[no-]parameter` are not used in the documentation. In the place of such parameters, the documentation should list two separate parameters: `--parameter` and `--no-parameter`. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jean-Noël Avila committed
Aug 11, 2025 at 20:53 UTC
03a353bb9759a1c775ba70f1e9ee865fc38291c2
36 files changed
+159
-78
Documentation/blame-options.adoc
+2
-1
@@ -75,7 +75,8 @@ include::line-range-format.adoc[]
75
iso format is used. For supported values, see the discussion
76
of the --date option at linkgit:git-log[1].
77
78
---[no-]progress::
78
+--progress::
79
+--no-progress::
80
Progress status is reported on the standard error stream
81
by default when it is attached to a terminal. This flag
82
enables progress reporting even if not attached to a
Documentation/diff-options.adoc
+2
-1
@@ -505,7 +505,8 @@ endif::git-format-patch[]
505
Turn off rename detection, even when the configuration
506
file gives the default to do so.
507
508
-`--[no-]rename-empty`::
508
+`--rename-empty`::
509
+`--no-rename-empty`::
510
Whether to use empty blobs as rename source.
511
512
ifndef::git-format-patch[]
Documentation/fetch-options.adoc
+10
-5
@@ -1,4 +1,5 @@
1
---[no-]all::
1
+--all::
2
+--no-all::
3
Fetch all remotes, except for the ones that has the
4
`remote.<name>.skipFetchAll` configuration variable set.
5
This overrides the configuration variable fetch.all`.
@@ -88,7 +89,8 @@ This is incompatible with `--recurse-submodules=[yes|on-demand]` and takes
89
precedence over the `fetch.output` config option.
90
91
ifndef::git-pull[]
91
---[no-]write-fetch-head::
92
+--write-fetch-head::
93
+--no-write-fetch-head::
94
Write the list of remote refs fetched in the `FETCH_HEAD`
95
file directly under `$GIT_DIR`. This is the default.
96
Passing `--no-write-fetch-head` from the command line tells
@@ -118,13 +120,16 @@ ifndef::git-pull[]
120
Allow several <repository> and <group> arguments to be
121
specified. No <refspec>s may be specified.
122
121
---[no-]auto-maintenance::
122
---[no-]auto-gc::
123
+--auto-maintenance::
124
+--no-auto-maintenance::
125
+--auto-gc::
126
+--no-auto-gc::
127
Run `git maintenance run --auto` at the end to perform automatic
128
repository maintenance if needed. (`--[no-]auto-gc` is a synonym.)
129
This is enabled by default.
130
127
---[no-]write-commit-graph::
131
+--write-commit-graph::
132
+--no-write-commit-graph::
133
Write a commit-graph after fetching. This overrides the config
134
setting `fetch.writeCommitGraph`.
135
endif::git-pull[]
Documentation/git-am.adoc
+2
-1
@@ -48,7 +48,8 @@ OPTIONS
48
--keep-non-patch::
49
Pass `-b` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).
50
51
---[no-]keep-cr::
51
+--keep-cr::
52
+--no-keep-cr::
53
With `--keep-cr`, call 'git mailsplit' (see linkgit:git-mailsplit[1])
54
with the same option, to prevent it from stripping CR at the end of
55
lines. `am.keepcr` configuration variable can be used to specify the
Documentation/git-backfill.adoc
+2
-1
@@ -57,7 +57,8 @@ OPTIONS
57
blobs seen at a given path. The default minimum batch size is
58
50,000.
59
60
-`--[no-]sparse`::
60
+`--sparse`::
61
+`--no-sparse`::
62
Only download objects if they appear at a path that matches the
63
current sparse-checkout. If the sparse-checkout feature is enabled,
64
then `--sparse` is assumed and can be disabled with `--no-sparse`.
Documentation/git-cat-file.adoc
+4
-2
@@ -62,8 +62,10 @@ OPTIONS
62
or to ask for a "blob" with `<object>` being a tag object that
63
points at it.
64
65
---[no-]mailmap::
66
---[no-]use-mailmap::
65
+--mailmap::
66
+--no-mailmap::
67
+--use-mailmap::
68
+--no-use-mailmap::
69
Use mailmap file to map author, committer and tagger names
70
and email addresses to canonical real names and email addresses.
71
See linkgit:git-shortlog[1].
Documentation/git-check-ref-format.adoc
+2
-1
@@ -98,7 +98,8 @@ a branch.
98
99
OPTIONS
100
-------
101
---[no-]allow-onelevel::
101
+--allow-onelevel::
102
+--no-allow-onelevel::
103
Controls whether one-level refnames are accepted (i.e.,
104
refnames that do not contain multiple `/`-separated
105
components). The default is `--no-allow-onelevel`.
Documentation/git-clone.adoc
+8
-4
@@ -272,7 +272,8 @@ corresponding `--mirror` and `--no-tags` options instead.
272
reachable from a specified remote branch or tag. This option
273
can be specified multiple times.
274
275
-`--[no-]single-branch`::
275
+`--single-branch`::
276
+`--no-single-branch`::
277
Clone only the history leading to the tip of a single branch,
278
either specified by the `--branch` option or the primary
279
branch remote's `HEAD` points at.
@@ -282,7 +283,8 @@ corresponding `--mirror` and `--no-tags` options instead.
283
branch when `--single-branch` clone was made, no remote-tracking
284
branch is created.
285
285
-`--[no-]tags`::
286
+`--tags`::
287
+`--no-tags`::
288
Control whether or not tags will be cloned. When `--no-tags` is
289
given, the option will be become permanent by setting the
290
`remote.<remote>.tagOpt=--no-tags` configuration. This ensures that
@@ -313,10 +315,12 @@ the clone is finished. This option is ignored if the cloned repository does
315
not have a worktree/checkout (i.e. if any of `--no-checkout`/`-n`, `--bare`,
316
or `--mirror` is given)
317
316
-`--[no-]shallow-submodules`::
318
+`--shallow-submodules`::
319
+`--no-shallow-submodules`::
320
All submodules which are cloned will be shallow with a depth of 1.
321
319
-`--[no-]remote-submodules`::
322
+`--remote-submodules`::
323
+`--no-remote-submodules`::
324
All submodules which are cloned will use the status of the submodule's
325
remote-tracking branch to update the submodule, rather than the
326
superproject's recorded SHA-1. Equivalent to passing `--remote` to
Documentation/git-commit-graph.adoc
+2
-1
@@ -34,7 +34,8 @@ OPTIONS
34
object directory, `git commit-graph ...` will exit with non-zero
35
status.
36
37
---[no-]progress::
37
+--progress::
38
+--no-progress::
39
Turn progress on/off explicitly. If neither is specified, progress is
40
shown if standard error is connected to a terminal.
41
Documentation/git-commit.adoc
+2
-1
@@ -214,7 +214,8 @@ include::signoff-option.adoc[]
214
each trailer would appear, and other details.
215
216
`-n`::
217
-`--[no-]verify`::
217
+`--verify`::
218
+`--no-verify`::
219
Bypass the `pre-commit` and `commit-msg` hooks.
220
See also linkgit:githooks[5].
221
Documentation/git-config.adoc
+2
-1
@@ -295,7 +295,8 @@ Valid `<type>`'s include:
295
When the color setting for `name` is undefined, the command uses
296
`color.ui` as fallback.
297
298
---[no-]includes::
298
+--includes::
299
+--no-includes::
300
Respect `include.*` directives in config files when looking up
301
values. Defaults to `off` when a specific file is given (e.g.,
302
using `--file`, `--global`, etc) and `on` when searching all
Documentation/git-difftool.adoc
+6
-3
@@ -77,7 +77,8 @@ with custom merge tool commands and has the same value as `$MERGED`.
77
--tool-help::
78
Print a list of diff tools that may be used with `--tool`.
79
80
---[no-]symlinks::
80
+--symlinks::
81
+--no-symlinks::
82
'git difftool''s default behavior is to create symlinks to the
83
working tree when run in `--dir-diff` mode and the right-hand
84
side of the comparison yields the same content as the file in
@@ -94,7 +95,8 @@ instead. `--no-symlinks` is the default on Windows.
95
Additionally, `$BASE` is set in the environment.
96
97
-g::
97
---[no-]gui::
98
+--gui::
99
+--no-gui::
100
When 'git-difftool' is invoked with the `-g` or `--gui` option
101
the default diff tool will be read from the configured
102
`diff.guitool` variable instead of `diff.tool`. This may be
@@ -104,7 +106,8 @@ instead. `--no-symlinks` is the default on Windows.
106
fallback in the order of `merge.guitool`, `diff.tool`,
107
`merge.tool` until a tool is found.
108
107
---[no-]trust-exit-code::
109
+--trust-exit-code::
110
+--no-trust-exit-code::
111
Errors reported by the diff tool are ignored by default.
112
Use `--trust-exit-code` to make 'git-difftool' exit when an
113
invoked diff tool returns a non-zero exit code.
Documentation/git-fast-import.adoc
+2
-1
@@ -111,7 +111,8 @@ Locations of Marks Files
111
Like --import-marks but instead of erroring out, silently
112
skips the file if it does not exist.
113
114
---[no-]relative-marks::
114
+--relative-marks::
115
+--no-relative-marks::
116
After specifying --relative-marks the paths specified
117
with --import-marks= and --export-marks= are relative
118
to an internal directory in the current repository.
Documentation/git-fmt-merge-msg.adoc
+2
-1
@@ -35,7 +35,8 @@ OPTIONS
35
Do not list one-line descriptions from the actual commits being
36
merged.
37
38
---[no-]summary::
38
+--summary::
39
+--no-summary::
40
Synonyms to --log and --no-log; these are deprecated and will be
41
removed in the future.
42
Documentation/git-format-patch.adoc
+8
-4
@@ -295,7 +295,8 @@ header). Note also that `git send-email` already handles this
295
transformation for you, and this option should not be used if you are
296
feeding the result to `git send-email`.
297
298
---[no-]force-in-body-from::
298
+--force-in-body-from::
299
+--no-force-in-body-from::
300
With the e-mail sender specified via the `--from` option, by
301
default, an in-body "From:" to identify the real author of
302
the commit is added at the top of the commit log message if
@@ -314,7 +315,8 @@ feeding the result to `git send-email`.
315
`Cc:`, and custom) headers added so far from config or command
316
line.
317
317
---[no-]cover-letter::
318
+--cover-letter::
319
+--no-cover-letter::
320
In addition to the patches, generate a cover letter file
321
containing the branch description, shortlog and the overall diffstat. You can
322
fill in a description in the file before sending it out.
@@ -379,7 +381,8 @@ configuration options in linkgit:git-notes[1] to use this workflow).
381
The default is `--no-notes`, unless the `format.notes` configuration is
382
set.
383
382
---[no-]signature=<signature>::
384
+--signature=<signature>::
385
+--no-signature::
386
Add a signature to each message produced. Per RFC 3676 the signature
387
is separated from the body by a line with '-- ' on it. If the
388
signature option is omitted the signature defaults to the Git version
@@ -411,7 +414,8 @@ you can use `--suffix=-patch` to get `0001-description-of-my-change-patch`.
414
Output an all-zero hash in each patch's From header instead
415
of the hash of the commit.
416
414
---[no-]base[=<commit>]::
417
+--no-base::
418
+--base[=<commit>]::
419
Record the base tree information to identify the state the
420
patch series applies to. See the BASE TREE INFORMATION section
421
below for details. If <commit> is "auto", a base commit is
Documentation/git-fsck.adoc
+6
-3
@@ -31,7 +31,8 @@ index file, all SHA-1 references in the `refs` namespace, and all reflogs
31
Print out objects that exist but that aren't reachable from any
32
of the reference nodes.
33
34
---[no-]dangling::
34
+--dangling::
35
+--no-dangling::
36
Print objects that exist but that are never 'directly' used (default).
37
`--no-dangling` can be used to omit this information from the output.
38
@@ -97,14 +98,16 @@ care about this output and want to speed it up further.
98
compatible with linkgit:git-rev-parse[1], e.g.
99
`HEAD@{1234567890}~25^2:src/`.
100
100
---[no-]progress::
101
+--progress::
102
+--no-progress::
103
Progress status is reported on the standard error stream by
104
default when it is attached to a terminal, unless
105
--no-progress or --verbose is specified. --progress forces
106
progress status even if the standard error stream is not
107
directed to a terminal.
108
107
---[no-]references::
109
+--references::
110
+--no-references::
111
Control whether to check the references database consistency
112
via 'git refs verify'. See linkgit:git-refs[1] for details.
113
The default is to check the references database.
Documentation/git-gc.adoc
+4
-2
@@ -53,11 +53,13 @@ configuration options such as `gc.auto` and `gc.autoPackLimit`, all
53
other housekeeping tasks (e.g. rerere, working trees, reflog...) will
54
be performed as well.
55
56
---[no-]detach::
56
+--detach::
57
+--no-detach::
58
Run in the background if the system supports it. This option overrides
59
the `gc.autoDetach` config.
60
60
---[no-]cruft::
61
+--cruft::
62
+--no-cruft::
63
When expiring unreachable objects, pack them separately into a
64
cruft pack instead of storing them as loose objects. `--cruft`
65
is on by default.
Documentation/git-index-pack.adoc
+2
-1
@@ -36,7 +36,8 @@ OPTIONS
36
fails if the name of packed archive does not end
37
with .pack).
38
39
---[no-]rev-index::
39
+--rev-index::
40
+--no-rev-index::
41
When this flag is provided, generate a reverse index
42
(a `.rev` file) corresponding to the given pack. If
43
`--verify` is given, ensure that the existing
Documentation/git-log.adoc
+4
-2
@@ -73,8 +73,10 @@ used as decoration if they match `HEAD`, `refs/heads/`, `refs/remotes/`,
73
Print out the ref name given on the command line by which each
74
commit was reached.
75
76
-`--[no-]mailmap`::
77
-`--[no-]use-mailmap`::
76
+`--mailmap`::
77
+`--no-mailmap`::
78
+`--use-mailmap`::
79
+`--no-use-mailmap`::
80
Use mailmap file to map author and committer names and email
81
addresses to canonical real names and email addresses. See
82
linkgit:git-shortlog[1].
Documentation/git-merge-tree.adoc
+2
-1
@@ -59,7 +59,8 @@ OPTIONS
59
do not list filenames multiple times if they have multiple
60
conflicting stages).
61
62
---[no-]messages::
62
+--messages::
63
+--no-messages::
64
Write any informational messages such as "Auto-merging <path>"
65
or CONFLICT notices to the end of stdout. If unspecified, the
66
default is to include these messages if there are merge
Documentation/git-multi-pack-index.adoc
+2
-1
@@ -25,7 +25,8 @@ OPTIONS
25
+
26
`<dir>` must be an alternate of the current repository.
27
28
---[no-]progress::
28
+--progress::
29
+--no-progress::
30
Turn progress on/off explicitly. If neither is specified, progress is
31
shown if standard error is connected to a terminal. Supported by
32
sub-commands `write`, `verify`, `expire`, and `repack.
Documentation/git-pack-objects.adoc
+2
-1
@@ -243,7 +243,8 @@ depth is 4095.
243
Add --no-reuse-object if you want to force a uniform compression
244
level on all data no matter the source.
245
246
---[no-]sparse::
246
+--sparse::
247
+--no-sparse::
248
Toggle the "sparse" algorithm to determine which objects to include in
249
the pack, when combined with the "--revs" option. This algorithm
250
only walks trees that appear in paths that introduce new objects.
Documentation/git-pull.adoc
+2
-1
@@ -87,7 +87,8 @@ OPTIONS
87
--verbose::
88
Pass --verbose to git-fetch and git-merge.
89
90
---[no-]recurse-submodules[=(yes|on-demand|no)]::
90
+--recurse-submodules[=(yes|on-demand|no)]::
91
+--no-recurse-submodules::
92
This option controls if new commits of populated submodules should
93
be fetched, and if the working trees of active submodules should be
94
updated, too (see linkgit:git-fetch[1], linkgit:git-config[1] and
Documentation/git-push.adoc
+12
-6
@@ -197,7 +197,8 @@ already exists on the remote side.
197
with configuration variable `push.followTags`. For more
198
information, see `push.followTags` in linkgit:git-config[1].
199
200
---[no-]signed::
200
+--signed::
201
+--no-signed::
202
--signed=(true|false|if-asked)::
203
GPG-sign the push request to update refs on the receiving
204
side, to allow it to be checked by the hooks and/or be
@@ -208,7 +209,8 @@ already exists on the remote side.
209
will also fail if the actual call to `gpg --sign` fails. See
210
linkgit:git-receive-pack[1] for the details on the receiving end.
211
211
---[no-]atomic::
212
+--atomic::
213
+--no-atomic::
214
Use an atomic transaction on the remote side if available.
215
Either all refs are updated, or on error, no refs are updated.
216
If the server does not support atomic pushes the push will fail.
@@ -232,7 +234,8 @@ already exists on the remote side.
234
repository over ssh, and you do not have the program in
235
a directory on the default $PATH.
236
235
---[no-]force-with-lease::
237
+--force-with-lease::
238
+--no-force-with-lease::
239
--force-with-lease=<refname>::
240
--force-with-lease=<refname>:<expect>::
241
Usually, "git push" refuses to update a remote ref that is
@@ -350,7 +353,8 @@ one branch, use a `+` in front of the refspec to push (e.g `git push
353
origin +master` to force a push to the `master` branch). See the
354
`<refspec>...` section above for details.
355
353
---[no-]force-if-includes::
356
+--force-if-includes::
357
+--no-force-if-includes::
358
Force an update only if the tip of the remote-tracking ref
359
has been integrated locally.
360
+
@@ -377,7 +381,8 @@ Specifying `--no-force-if-includes` disables this behavior.
381
linkgit:git-pull[1] and other commands. For more information,
382
see `branch.<name>.merge` in linkgit:git-config[1].
383
380
---[no-]thin::
384
+--thin::
385
+--no-thin::
386
These options are passed to linkgit:git-send-pack[1]. A thin transfer
387
significantly reduces the amount of sent data when the sender and
388
receiver share many of the same objects in common. The default is
@@ -419,7 +424,8 @@ When using 'on-demand' or 'only', if a submodule has a
424
"push.recurseSubmodules={on-demand,only}" or "submodule.recurse" configuration,
425
further recursion will occur. In this case, "only" is treated as "on-demand".
426
422
---[no-]verify::
427
+--verify::
428
+--no-verify::
429
Toggle the pre-push hook (see linkgit:githooks[5]). The
430
default is --verify, giving the hook a chance to prevent the
431
push. With --no-verify, the hook is bypassed completely.
Documentation/git-range-diff.adoc
+2
-1
@@ -96,7 +96,8 @@ diff.
96
--remerge-diff::
97
Convenience option, equivalent to `--diff-merges=remerge`.
98
99
---[no-]notes[=<ref>]::
99
+--notes[=<ref>]::
100
+--no-notes::
101
This flag is passed to the `git log` program
102
(see linkgit:git-log[1]) that generates the patches.
103
Documentation/git-read-tree.adoc
+2
-1
@@ -100,7 +100,8 @@ OPTIONS
100
directories the index file and index output file are
101
located in.
102
103
---[no-]recurse-submodules::
103
+--recurse-submodules::
104
+--no-recurse-submodules::
105
Using --recurse-submodules will update the content of all active
106
submodules according to the commit recorded in the superproject by
107
calling read-tree recursively, also setting the submodules' HEAD to be
Documentation/git-reset.adoc
+2
-1
@@ -90,7 +90,8 @@ but carries forward unmerged index entries.
90
If a file that is different between _<commit>_ and `HEAD` has local
91
changes, reset is aborted.
92
93
-`--[no-]recurse-submodules`::
93
+`--recurse-submodules`::
94
+`--no-recurse-submodules`::
95
When the working tree is updated, using `--recurse-submodules` will
96
also recursively reset the working tree of all active submodules
97
according to the commit recorded in the superproject, also setting
Documentation/git-send-email.adoc
+20
-10
@@ -115,7 +115,8 @@ illustration below where `[PATCH v2 0/3]` is in reply to `[PATCH 0/2]`:
115
Only necessary if `--compose` is also set. If `--compose`
116
is not set, this will be prompted for.
117
118
---[no-]outlook-id-fix::
118
+--outlook-id-fix::
119
+--no-outlook-id-fix::
120
Microsoft Outlook SMTP servers discard the Message-ID sent via email and
121
assign a new random Message-ID, thus breaking threads.
122
+
@@ -350,7 +351,8 @@ Automating
351
--no-header-cmd::
352
Disable any header command in use.
353
353
---[no-]chain-reply-to::
354
+--chain-reply-to::
355
+--no-chain-reply-to::
356
If this is set, each email will be sent as a reply to the previous
357
email sent. If disabled with `--no-chain-reply-to`, all emails after
358
the first will be sent as replies to the first email sent. When using
@@ -364,19 +366,22 @@ Automating
366
values in the `sendemail` section. The default identity is
367
the value of `sendemail.identity`.
368
367
---[no-]signed-off-by-cc::
369
+--signed-off-by-cc::
370
+--no-signed-off-by-cc::
371
If this is set, add emails found in the `Signed-off-by` trailer or `Cc:`
372
lines to the cc list. Default is the value of `sendemail.signedOffByCc`
373
configuration value; if that is unspecified, default to
374
`--signed-off-by-cc`.
375
373
---[no-]cc-cover::
376
+--cc-cover::
377
+--no-cc-cover::
378
If this is set, emails found in `Cc:` headers in the first patch of
379
the series (typically the cover letter) are added to the cc list
380
for each email set. Default is the value of `sendemail.ccCover`
381
configuration value; if that is unspecified, default to `--no-cc-cover`.
382
379
---[no-]to-cover::
383
+--to-cover::
384
+--no-to-cover::
385
If this is set, emails found in `To:` headers in the first patch of
386
the series (typically the cover letter) are added to the to list
387
for each email set. Default is the value of `sendemail.toCover`
@@ -407,12 +412,14 @@ Default is the value of `sendemail.suppressCc` configuration value; if
412
that is unspecified, default to `self` if `--suppress-from` is
413
specified, as well as `body` if `--no-signed-off-cc` is specified.
414
410
---[no-]suppress-from::
415
+--suppress-from::
416
+--no-suppress-from::
417
If this is set, do not add the `From:` address to the `Cc:` list.
418
Default is the value of `sendemail.suppressFrom` configuration
419
value; if that is unspecified, default to `--no-suppress-from`.
420
415
---[no-]thread::
421
+--thread::
422
+--no-thread::
423
If this is set, the `In-Reply-To` and `References` headers will be
424
added to each email sent. Whether each mail refers to the
425
previous email (`deep` threading per `git format-patch`
@@ -430,7 +437,8 @@ exists when `git send-email` is asked to add it (especially note that
437
Failure to do so may not produce the expected result in the
438
recipient's MUA.
439
433
---[no-]mailmap::
440
+--mailmap::
441
+--no-mailmap::
442
Use the mailmap file (see linkgit:gitmailmap[5]) to map all
443
addresses to their canonical real name and email address. Additional
444
mailmap data specific to `git send-email` may be provided using the
@@ -459,7 +467,8 @@ have been specified, in which case default to `compose`.
467
--dry-run::
468
Do everything except actually send the emails.
469
462
---[no-]format-patch::
470
+--format-patch::
471
+--no-format-patch::
472
When an argument may be understood either as a reference or as a file name,
473
choose to understand it as a format-patch argument (`--format-patch`)
474
or as a file name (`--no-format-patch`). By default, when such a conflict
@@ -469,7 +478,8 @@ have been specified, in which case default to `compose`.
478
Make `git send-email` less verbose. One line per email should be
479
all that is output.
480
472
---[no-]validate::
481
+--validate::
482
+--no-validate::
483
Perform sanity checks on patches.
484
Currently, validation means the following:
485
+
Documentation/git-send-pack.adoc
+2
-1
@@ -71,7 +71,8 @@ be in a separate packet, and the list must end with a flush packet.
71
fails to update then the entire push will fail without changing any
72
refs.
73
74
---[no-]signed::
74
+--signed::
75
+--no-signed::
76
--signed=(true|false|if-asked)::
77
GPG-sign the push request to update refs on the receiving
78
side, to allow it to be checked by the hooks and/or be
Documentation/git-submodule.adoc
+4
-2
@@ -435,7 +435,8 @@ options carefully.
435
clone with a history truncated to the specified number of revisions.
436
See linkgit:git-clone[1]
437
438
---[no-]recommend-shallow::
438
+--recommend-shallow::
439
+--no-recommend-shallow::
440
This option is only valid for the update command.
441
The initial clone of a submodule will use the recommended
442
`submodule.<name>.shallow` as provided by the `.gitmodules` file
@@ -447,7 +448,8 @@ options carefully.
448
Clone new submodules in parallel with as many jobs.
449
Defaults to the `submodule.fetchJobs` option.
450
450
---[no-]single-branch::
451
+--single-branch::
452
+--no-single-branch::
453
This option is only valid for the update command.
454
Clone only one branch during update: HEAD or one specified by --branch.
455
Documentation/git-update-index.adoc
+8
-4
@@ -86,7 +86,8 @@ OPTIONS
86
--chmod=(+|-)x::
87
Set the execute permissions on the updated files.
88
89
---[no-]assume-unchanged::
89
+--assume-unchanged::
90
+--no-assume-unchanged::
91
When this flag is specified, the object names recorded
92
for the paths are not updated. Instead, this option
93
sets/unsets the "assume unchanged" bit for the
@@ -108,18 +109,21 @@ you will need to handle the situation manually.
109
Like `--refresh`, but checks stat information unconditionally,
110
without regard to the "assume unchanged" setting.
111
111
---[no-]skip-worktree::
112
+--skip-worktree::
113
+--no-skip-worktree::
114
When one of these flags is specified, the object names recorded
115
for the paths are not updated. Instead, these options
116
set and unset the "skip-worktree" bit for the paths. See
117
section "Skip-worktree bit" below for more information.
118
119
118
---[no-]ignore-skip-worktree-entries::
120
+--ignore-skip-worktree-entries::
121
+--no-ignore-skip-worktree-entries::
122
Do not remove skip-worktree (AKA "index-only") entries even when
123
the `--remove` option was specified.
124
122
---[no-]fsmonitor-valid::
125
+--fsmonitor-valid::
126
+--no-fsmonitor-valid::
127
When one of these flags is specified, the object names recorded
128
for the paths are not updated. Instead, these options
129
set and unset the "fsmonitor valid" bit for the paths. See
Documentation/git-upload-pack.adoc
+2
-1
@@ -25,7 +25,8 @@ repository. For push operations, see 'git send-pack'.
25
OPTIONS
26
-------
27
28
---[no-]strict::
28
+--strict::
29
+--no-strict::
30
Do not try <directory>/.git/ if <directory> is not a Git directory.
31
32
--timeout=<n>::
Documentation/git-worktree.adoc
+8
-4
@@ -200,13 +200,15 @@ To remove a locked worktree, specify `--force` twice.
200
With `add`, detach `HEAD` in the new worktree. See "DETACHED HEAD"
201
in linkgit:git-checkout[1].
202
203
---[no-]checkout::
203
+--checkout::
204
+--no-checkout::
205
By default, `add` checks out `<commit-ish>`, however, `--no-checkout` can
206
be used to suppress checkout in order to make customizations,
207
such as configuring sparse-checkout. See "Sparse checkout"
208
in linkgit:git-read-tree[1].
209
209
---[no-]guess-remote::
210
+--guess-remote::
211
+--no-guess-remote::
212
With `worktree add <path>`, without `<commit-ish>`, instead
213
of creating a new branch from `HEAD`, if there exists a tracking
214
branch in exactly one remote matching the basename of `<path>`,
@@ -216,7 +218,8 @@ To remove a locked worktree, specify `--force` twice.
218
This can also be set up as the default behaviour by using the
219
`worktree.guessRemote` config option.
220
219
---[no-]relative-paths::
221
+--relative-paths::
222
+--no-relative-paths::
223
Link worktrees using relative paths or absolute paths (default).
224
Overrides the `worktree.useRelativePaths` config option, see
225
linkgit:git-config[1].
@@ -224,7 +227,8 @@ This can also be set up as the default behaviour by using the
227
With `repair`, the linking files will be updated if there's an absolute/relative
228
mismatch, even if the links are correct.
229
227
---[no-]track::
230
+--track::
231
+--no-track::
232
When creating a new branch, if `<commit-ish>` is a branch,
233
mark it as "upstream" from the new branch. This is the
234
default if `<commit-ish>` is a remote-tracking branch. See
Documentation/lint-documentation-style.perl
+3
@@ -18,6 +18,9 @@ while (my $line = <>) {
18
19
report($line, "multiple parameters in a definition list item");
20
}
21
+ if ($line =~ /^`?--\[no-\][a-z0-9-]+.*(::|;;)$/) {
22
+ report($line, "definition list item with a `--[no-]` parameter");
23
+ }
24
}
25
26
Documentation/merge-options.adoc
+2
-1
@@ -135,7 +135,8 @@ ifdef::git-pull[]
135
Only useful when merging.
136
endif::git-pull[]
137
138
-`--[no-]verify`::
138
+`--verify`::
139
+`--no-verify`::
140
By default, the pre-merge and commit-msg hooks are run.
141
When `--no-verify` is given, these are bypassed.
142
See also linkgit:githooks[5].
Documentation/scalar.adoc
+12
-6
@@ -71,7 +71,8 @@ HEAD[:<directory>]`.
71
Instead of checking out the branch pointed to by the cloned
72
repository's HEAD, check out the `<name>` branch instead.
73
74
---[no-]single-branch::
74
+--single-branch::
75
+--no-single-branch::
76
Clone only the history leading to the tip of a single branch, either
77
specified by the `--branch` option or the primary branch remote's
78
`HEAD` points at.
@@ -81,23 +82,27 @@ remote-tracking branch for the branch this option was used for the initial
82
cloning. If the HEAD at the remote did not point at any branch when
83
`--single-branch` clone was made, no remote-tracking branch is created.
84
84
---[no-]src::
85
+--src::
86
+--no-src::
87
By default, `scalar clone` places the cloned repository within a
88
`<entlistment>/src` directory. Use `--no-src` to place the cloned
89
repository directly in the `<enlistment>` directory.
90
89
---[no-]tags::
91
+--tags::
92
+--no-tags::
93
By default, `scalar clone` will fetch the tag objects advertised by
94
the remote and future `git fetch` commands will do the same. Use
95
`--no-tags` to avoid fetching tags in `scalar clone` and to configure
96
the repository to avoid fetching tags in the future. To fetch tags after
97
cloning with `--no-tags`, run `git fetch --tags`.
98
96
---[no-]full-clone::
99
+--full-clone::
100
+--no-full-clone::
101
A sparse-checkout is initialized by default. This behavior can be
102
turned off via `--full-clone`.
103
100
---[no-]maintenance::
104
+--maintenance::
105
+--no-maintenance::
106
By default, `scalar clone` configures the enlistment to use Git's
107
background maintenance feature. Use the `--no-maintenance` to skip
108
this configuration.
@@ -122,7 +127,8 @@ Note: when this subcommand is called in a worktree that is called `src/`, its
127
parent directory is considered to be the Scalar enlistment. If the worktree is
128
_not_ called `src/`, it itself will be considered to be the Scalar enlistment.
129
125
---[no-]maintenance::
130
+--maintenance::
131
+--no-maintenance::
132
By default, `scalar register` configures the enlistment to use Git's
133
background maintenance feature. Use the `--no-maintenance` to skip
134
this configuration. This does not disable any maintenance that may