]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: check for absence of the form --[no-]parameter
authorJean-Noël Avila <jn.avila@free.fr>
Mon, 11 Aug 2025 20:53:18 +0000 (20:53 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Aug 2025 21:16:04 +0000 (14:16 -0700)
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>
36 files changed:
Documentation/blame-options.adoc
Documentation/diff-options.adoc
Documentation/fetch-options.adoc
Documentation/git-am.adoc
Documentation/git-backfill.adoc
Documentation/git-cat-file.adoc
Documentation/git-check-ref-format.adoc
Documentation/git-clone.adoc
Documentation/git-commit-graph.adoc
Documentation/git-commit.adoc
Documentation/git-config.adoc
Documentation/git-difftool.adoc
Documentation/git-fast-import.adoc
Documentation/git-fmt-merge-msg.adoc
Documentation/git-format-patch.adoc
Documentation/git-fsck.adoc
Documentation/git-gc.adoc
Documentation/git-index-pack.adoc
Documentation/git-log.adoc
Documentation/git-merge-tree.adoc
Documentation/git-multi-pack-index.adoc
Documentation/git-pack-objects.adoc
Documentation/git-pull.adoc
Documentation/git-push.adoc
Documentation/git-range-diff.adoc
Documentation/git-read-tree.adoc
Documentation/git-reset.adoc
Documentation/git-send-email.adoc
Documentation/git-send-pack.adoc
Documentation/git-submodule.adoc
Documentation/git-update-index.adoc
Documentation/git-upload-pack.adoc
Documentation/git-worktree.adoc
Documentation/lint-documentation-style.perl
Documentation/merge-options.adoc
Documentation/scalar.adoc

index 19ea1872388ffe7e4bd5b9037f7299592f842b3b..1fb948fc76f3ab3994e7642416d4bb65b4edc5bc 100644 (file)
@@ -75,7 +75,8 @@ include::line-range-format.adoc[]
        iso format is used. For supported values, see the discussion
        of the --date option at linkgit:git-log[1].
 
---[no-]progress::
+--progress::
+--no-progress::
        Progress status is reported on the standard error stream
        by default when it is attached to a terminal. This flag
        enables progress reporting even if not attached to a
index f3a35d81411f1e01eca2e22a97a77e600f07744e..f19b85142f4eea639c2e98b99bf7dc4b6fcab340 100644 (file)
@@ -505,7 +505,8 @@ endif::git-format-patch[]
        Turn off rename detection, even when the configuration
        file gives the default to do so.
 
-`--[no-]rename-empty`::
+`--rename-empty`::
+`--no-rename-empty`::
        Whether to use empty blobs as rename source.
 
 ifndef::git-format-patch[]
index b01372e4b3c6595beb2e16d53322b08c09291c90..d3ac31f4e2a1a718f7704f985831ab0bca94ffea 100644 (file)
@@ -1,4 +1,5 @@
---[no-]all::
+--all::
+--no-all::
        Fetch all remotes, except for the ones that has the
        `remote.<name>.skipFetchAll` configuration variable set.
        This overrides the configuration variable fetch.all`.
@@ -88,7 +89,8 @@ This is incompatible with `--recurse-submodules=[yes|on-demand]` and takes
 precedence over the `fetch.output` config option.
 
 ifndef::git-pull[]
---[no-]write-fetch-head::
+--write-fetch-head::
+--no-write-fetch-head::
        Write the list of remote refs fetched in the `FETCH_HEAD`
        file directly under `$GIT_DIR`.  This is the default.
        Passing `--no-write-fetch-head` from the command line tells
@@ -118,13 +120,16 @@ ifndef::git-pull[]
        Allow several <repository> and <group> arguments to be
        specified. No <refspec>s may be specified.
 
---[no-]auto-maintenance::
---[no-]auto-gc::
+--auto-maintenance::
+--no-auto-maintenance::
+--auto-gc::
+--no-auto-gc::
        Run `git maintenance run --auto` at the end to perform automatic
        repository maintenance if needed. (`--[no-]auto-gc` is a synonym.)
        This is enabled by default.
 
---[no-]write-commit-graph::
+--write-commit-graph::
+--no-write-commit-graph::
        Write a commit-graph after fetching. This overrides the config
        setting `fetch.writeCommitGraph`.
 endif::git-pull[]
index 221070de4812276171b494017e22fb6e4bff543a..b23b4fba2013c261a039fbfdd4db8d2935122c0e 100644 (file)
@@ -48,7 +48,8 @@ OPTIONS
 --keep-non-patch::
        Pass `-b` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).
 
---[no-]keep-cr::
+--keep-cr::
+--no-keep-cr::
        With `--keep-cr`, call 'git mailsplit' (see linkgit:git-mailsplit[1])
        with the same option, to prevent it from stripping CR at the end of
        lines. `am.keepcr` configuration variable can be used to specify the
index 95623051f789b29b704ac4ca8c12e98bc381a05c..b8394dcf22b6e1e195b9bab202161cf3d1543a03 100644 (file)
@@ -57,7 +57,8 @@ OPTIONS
        blobs seen at a given path. The default minimum batch size is
        50,000.
 
-`--[no-]sparse`::
+`--sparse`::
+`--no-sparse`::
        Only download objects if they appear at a path that matches the
        current sparse-checkout. If the sparse-checkout feature is enabled,
        then `--sparse` is assumed and can be disabled with `--no-sparse`.
index 180d1ad363fdf8d799f3b5a653e1453a7113bf1c..c139f55a168d61fa0db8ef713c55d84468c9dc9d 100644 (file)
@@ -62,8 +62,10 @@ OPTIONS
        or to ask for a "blob" with `<object>` being a tag object that
        points at it.
 
---[no-]mailmap::
---[no-]use-mailmap::
+--mailmap::
+--no-mailmap::
+--use-mailmap::
+--no-use-mailmap::
        Use mailmap file to map author, committer and tagger names
        and email addresses to canonical real names and email addresses.
        See linkgit:git-shortlog[1].
index 2aacfd18088d6506bfd8aa3ca7380888e8dbcffa..0c3abf91465788d2021a8b1c579dbfd841c7a6c9 100644 (file)
@@ -98,7 +98,8 @@ a branch.
 
 OPTIONS
 -------
---[no-]allow-onelevel::
+--allow-onelevel::
+--no-allow-onelevel::
        Controls whether one-level refnames are accepted (i.e.,
        refnames that do not contain multiple `/`-separated
        components).  The default is `--no-allow-onelevel`.
index 222d558290ed6b506182c34dcb57b52351be0e56..031b56f09824c8e4cb97640726c699ae6b8b0e07 100644 (file)
@@ -272,7 +272,8 @@ corresponding `--mirror` and `--no-tags` options instead.
        reachable from a specified remote branch or tag.  This option
        can be specified multiple times.
 
-`--[no-]single-branch`::
+`--single-branch`::
+`--no-single-branch`::
        Clone only the history leading to the tip of a single branch,
        either specified by the `--branch` option or the primary
        branch remote's `HEAD` points at.
@@ -282,7 +283,8 @@ corresponding `--mirror` and `--no-tags` options instead.
        branch when `--single-branch` clone was made, no remote-tracking
        branch is created.
 
-`--[no-]tags`::
+`--tags`::
+`--no-tags`::
        Control whether or not tags will be cloned. When `--no-tags` is
        given, the option will be become permanent by setting the
        `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
 not have a worktree/checkout (i.e. if any of `--no-checkout`/`-n`, `--bare`,
 or `--mirror` is given)
 
-`--[no-]shallow-submodules`::
+`--shallow-submodules`::
+`--no-shallow-submodules`::
        All submodules which are cloned will be shallow with a depth of 1.
 
-`--[no-]remote-submodules`::
+`--remote-submodules`::
+`--no-remote-submodules`::
        All submodules which are cloned will use the status of the submodule's
        remote-tracking branch to update the submodule, rather than the
        superproject's recorded SHA-1. Equivalent to passing `--remote` to
index 50b50168045cc623809709f1241cc23f24a3a058..e9558173c001f12a53eac1eacbc3650ff0e69d02 100644 (file)
@@ -34,7 +34,8 @@ OPTIONS
        object directory, `git commit-graph ...` will exit with non-zero
        status.
 
---[no-]progress::
+--progress::
+--no-progress::
        Turn progress on/off explicitly. If neither is specified, progress is
        shown if standard error is connected to a terminal.
 
index d4d576ce665f1967782aefa41dd39b7c35e65179..54c207ad45eaa2a46519e90883dfa77af738380e 100644 (file)
@@ -214,7 +214,8 @@ include::signoff-option.adoc[]
        each trailer would appear, and other details.
 
 `-n`::
-`--[no-]verify`::
+`--verify`::
+`--no-verify`::
        Bypass the `pre-commit` and `commit-msg` hooks.
        See also linkgit:githooks[5].
 
index 511b2e26bfb00fb29c6a635826c87bdcca3f55e9..36d28451528e7901b4afaca434b18dbe3ea0120a 100644 (file)
@@ -295,7 +295,8 @@ Valid `<type>`'s include:
        When the color setting for `name` is undefined, the command uses
        `color.ui` as fallback.
 
---[no-]includes::
+--includes::
+--no-includes::
        Respect `include.*` directives in config files when looking up
        values. Defaults to `off` when a specific file is given (e.g.,
        using `--file`, `--global`, etc) and `on` when searching all
index d596205eaf3bfda1d2c3a3b8cb19301806d37335..064bc683471f215b08652a34a381d2f5a33a0eea 100644 (file)
@@ -77,7 +77,8 @@ with custom merge tool commands and has the same value as `$MERGED`.
 --tool-help::
        Print a list of diff tools that may be used with `--tool`.
 
---[no-]symlinks::
+--symlinks::
+--no-symlinks::
        'git difftool''s default behavior is to create symlinks to the
        working tree when run in `--dir-diff` mode and the right-hand
        side of the comparison yields the same content as the file in
@@ -94,7 +95,8 @@ instead.  `--no-symlinks` is the default on Windows.
        Additionally, `$BASE` is set in the environment.
 
 -g::
---[no-]gui::
+--gui::
+--no-gui::
        When 'git-difftool' is invoked with the `-g` or `--gui` option
        the default diff tool will be read from the configured
        `diff.guitool` variable instead of `diff.tool`. This may be
@@ -104,7 +106,8 @@ instead.  `--no-symlinks` is the default on Windows.
        fallback in the order of `merge.guitool`, `diff.tool`,
        `merge.tool` until a tool is found.
 
---[no-]trust-exit-code::
+--trust-exit-code::
+--no-trust-exit-code::
        Errors reported by the diff tool are ignored by default.
        Use `--trust-exit-code` to make 'git-difftool' exit when an
        invoked diff tool returns a non-zero exit code.
index 6490d67fab56e19019f932b36a32939dc904ed2a..3144ffcdb689d563862e617fc43b5def731f4f05 100644 (file)
@@ -111,7 +111,8 @@ Locations of Marks Files
        Like --import-marks but instead of erroring out, silently
        skips the file if it does not exist.
 
---[no-]relative-marks::
+--relative-marks::
+--no-relative-marks::
        After specifying --relative-marks the paths specified
        with --import-marks= and --export-marks= are relative
        to an internal directory in the current repository.
index 0f3328956dfda27a96f9c610f8510c4ed04d204c..6d91620be979a2827c2e3368295a549d76e90efe 100644 (file)
@@ -35,7 +35,8 @@ OPTIONS
        Do not list one-line descriptions from the actual commits being
        merged.
 
---[no-]summary::
+--summary::
+--no-summary::
        Synonyms to --log and --no-log; these are deprecated and will be
        removed in the future.
 
index a8b53db9a6635b69cdd86241cc1f25936f224ef6..048d1b981524496fc6edee42c5db0a1df3320de9 100644 (file)
@@ -295,7 +295,8 @@ header). Note also that `git send-email` already handles this
 transformation for you, and this option should not be used if you are
 feeding the result to `git send-email`.
 
---[no-]force-in-body-from::
+--force-in-body-from::
+--no-force-in-body-from::
        With the e-mail sender specified via the `--from` option, by
        default, an in-body "From:" to identify the real author of
        the commit is added at the top of the commit log message if
@@ -314,7 +315,8 @@ feeding the result to `git send-email`.
        `Cc:`, and custom) headers added so far from config or command
        line.
 
---[no-]cover-letter::
+--cover-letter::
+--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.
@@ -379,7 +381,8 @@ 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>::
+--signature=<signature>::
+--no-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
@@ -411,7 +414,8 @@ you can use `--suffix=-patch` to get `0001-description-of-my-change-patch`.
   Output an all-zero hash in each patch's From header instead
   of the hash of the commit.
 
---[no-]base[=<commit>]::
+--no-base::
+--base[=<commit>]::
        Record the base tree information to identify the state the
        patch series applies to.  See the BASE TREE INFORMATION section
        below for details. If <commit> is "auto", a base commit is
index 11203ba925c71743bc051f0ba80f6b3a7f3e40db..1751f692d42b8c4864aa9f40b32dd6bbf8395697 100644 (file)
@@ -31,7 +31,8 @@ index file, all SHA-1 references in the `refs` namespace, and all reflogs
        Print out objects that exist but that aren't reachable from any
        of the reference nodes.
 
---[no-]dangling::
+--dangling::
+--no-dangling::
        Print objects that exist but that are never 'directly' used (default).
        `--no-dangling` can be used to omit this information from the output.
 
@@ -97,14 +98,16 @@ care about this output and want to speed it up further.
        compatible with linkgit:git-rev-parse[1], e.g.
        `HEAD@{1234567890}~25^2:src/`.
 
---[no-]progress::
+--progress::
+--no-progress::
        Progress status is reported on the standard error stream by
        default when it is attached to a terminal, unless
        --no-progress or --verbose is specified. --progress forces
        progress status even if the standard error stream is not
        directed to a terminal.
 
---[no-]references::
+--references::
+--no-references::
        Control whether to check the references database consistency
        via 'git refs verify'. See linkgit:git-refs[1] for details.
        The default is to check the references database.
index 526ce01463d7ffda156223d0e44987770c7c8d54..6fed646dd883941f62499c2c1b6b977e767c9a78 100644 (file)
@@ -53,11 +53,13 @@ configuration options such as `gc.auto` and `gc.autoPackLimit`, all
 other housekeeping tasks (e.g. rerere, working trees, reflog...) will
 be performed as well.
 
---[no-]detach::
+--detach::
+--no-detach::
        Run in the background if the system supports it. This option overrides
        the `gc.autoDetach` config.
 
---[no-]cruft::
+--cruft::
+--no-cruft::
        When expiring unreachable objects, pack them separately into a
        cruft pack instead of storing them as loose objects. `--cruft`
        is on by default.
index 270056cf6352bd692c7684fa09c14a755b6a75cb..18036953c06b228aba5b97f1f93930bdb43e290d 100644 (file)
@@ -36,7 +36,8 @@ OPTIONS
        fails if the name of packed archive does not end
        with .pack).
 
---[no-]rev-index::
+--rev-index::
+--no-rev-index::
        When this flag is provided, generate a reverse index
        (a `.rev` file) corresponding to the given pack. If
        `--verify` is given, ensure that the existing
index b6f3d92c435f56d0864fef7d87b8de38ffd1c172..e304739c5e8011998ab8dd355dca7b26c1d99dd1 100644 (file)
@@ -73,8 +73,10 @@ used as decoration if they match `HEAD`, `refs/heads/`, `refs/remotes/`,
        Print out the ref name given on the command line by which each
        commit was reached.
 
-`--[no-]mailmap`::
-`--[no-]use-mailmap`::
+`--mailmap`::
+`--no-mailmap`::
+`--use-mailmap`::
+`--no-use-mailmap`::
        Use mailmap file to map author and committer names and email
        addresses to canonical real names and email addresses. See
        linkgit:git-shortlog[1].
index f824eea61f1e067c8ce7b49bde32c8922850a352..271ab220e8d75b4e157f3ae6e6366b764528f9f0 100644 (file)
@@ -59,7 +59,8 @@ OPTIONS
        do not list filenames multiple times if they have multiple
        conflicting stages).
 
---[no-]messages::
+--messages::
+--no-messages::
        Write any informational messages such as "Auto-merging <path>"
        or CONFLICT notices to the end of stdout.  If unspecified, the
        default is to include these messages if there are merge
index b6cd0d7f855d5fe645801f562371afcd547e0dd8..e8073bc272327cdad9f5637764f5eba3e90dc1f8 100644 (file)
@@ -25,7 +25,8 @@ OPTIONS
 +
 `<dir>` must be an alternate of the current repository.
 
---[no-]progress::
+--progress::
+--no-progress::
        Turn progress on/off explicitly. If neither is specified, progress is
        shown if standard error is connected to a terminal. Supported by
        sub-commands `write`, `verify`, `expire`, and `repack.
index eba014c40615ebd5188ae1eeb27effed9f8f7ee5..71b9682485c38b0108c09e2927f213ea815074e2 100644 (file)
@@ -243,7 +243,8 @@ depth is 4095.
        Add --no-reuse-object if you want to force a uniform compression
        level on all data no matter the source.
 
---[no-]sparse::
+--sparse::
+--no-sparse::
        Toggle the "sparse" algorithm to determine which objects to include in
        the pack, when combined with the "--revs" option. This algorithm
        only walks trees that appear in paths that introduce new objects.
index 3f4ecc47301ae3887ca6e4c8b229f7c69b72ab6e..48e924a10a40c0fc541a199cb46166d734745af0 100644 (file)
@@ -87,7 +87,8 @@ OPTIONS
 --verbose::
        Pass --verbose to git-fetch and git-merge.
 
---[no-]recurse-submodules[=(yes|on-demand|no)]::
+--recurse-submodules[=(yes|on-demand|no)]::
+--no-recurse-submodules::
        This option controls if new commits of populated submodules should
        be fetched, and if the working trees of active submodules should be
        updated, too (see linkgit:git-fetch[1], linkgit:git-config[1] and
index d1978650d60a7c5456b0b4327c4ec4953988c465..5f5408e2c01d26b52edb2bf90989dcc2fe873686 100644 (file)
@@ -197,7 +197,8 @@ already exists on the remote side.
        with configuration variable `push.followTags`.  For more
        information, see `push.followTags` in linkgit:git-config[1].
 
---[no-]signed::
+--signed::
+--no-signed::
 --signed=(true|false|if-asked)::
        GPG-sign the push request to update refs on the receiving
        side, to allow it to be checked by the hooks and/or be
@@ -208,7 +209,8 @@ already exists on the remote side.
        will also fail if the actual call to `gpg --sign` fails.  See
        linkgit:git-receive-pack[1] for the details on the receiving end.
 
---[no-]atomic::
+--atomic::
+--no-atomic::
        Use an atomic transaction on the remote side if available.
        Either all refs are updated, or on error, no refs are updated.
        If the server does not support atomic pushes the push will fail.
@@ -232,7 +234,8 @@ already exists on the remote side.
        repository over ssh, and you do not have the program in
        a directory on the default $PATH.
 
---[no-]force-with-lease::
+--force-with-lease::
+--no-force-with-lease::
 --force-with-lease=<refname>::
 --force-with-lease=<refname>:<expect>::
        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
 origin +master` to force a push to the `master` branch). See the
 `<refspec>...` section above for details.
 
---[no-]force-if-includes::
+--force-if-includes::
+--no-force-if-includes::
        Force an update only if the tip of the remote-tracking ref
        has been integrated locally.
 +
@@ -377,7 +381,8 @@ Specifying `--no-force-if-includes` disables this behavior.
        linkgit:git-pull[1] and other commands. For more information,
        see `branch.<name>.merge` in linkgit:git-config[1].
 
---[no-]thin::
+--thin::
+--no-thin::
        These options are passed to linkgit:git-send-pack[1]. A thin transfer
        significantly reduces the amount of sent data when the sender and
        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
 "push.recurseSubmodules={on-demand,only}" or "submodule.recurse" configuration,
 further recursion will occur. In this case, "only" is treated as "on-demand".
 
---[no-]verify::
+--verify::
+--no-verify::
        Toggle the pre-push hook (see linkgit:githooks[5]).  The
        default is --verify, giving the hook a chance to prevent the
        push.  With --no-verify, the hook is bypassed completely.
index db0e4279b52847dc00b4d2e146bc6d35024119ab..b5e85d37f1bee7a7a67d286c4d1ebbea7948020f 100644 (file)
@@ -96,7 +96,8 @@ diff.
 --remerge-diff::
        Convenience option, equivalent to `--diff-merges=remerge`.
 
---[no-]notes[=<ref>]::
+--notes[=<ref>]::
+--no-notes::
        This flag is passed to the `git log` program
        (see linkgit:git-log[1]) that generates the patches.
 
index 1c48c289963063c2e0db605bbb27c35dd803270c..1c04bba2b7b843cfb8522c902f7e649183942599 100644 (file)
@@ -100,7 +100,8 @@ OPTIONS
        directories the index file and index output file are
        located in.
 
---[no-]recurse-submodules::
+--recurse-submodules::
+--no-recurse-submodules::
        Using --recurse-submodules will update the content of all active
        submodules according to the commit recorded in the superproject by
        calling read-tree recursively, also setting the submodules' HEAD to be
index 50e8a0ba6f6612d7a77e73603ec6111bc38e37fe..3b9ba9aee95203de0017af14fa2bb026276041bc 100644 (file)
@@ -90,7 +90,8 @@ but carries forward unmerged index entries.
        If a file that is different between _<commit>_ and `HEAD` has local
        changes, reset is aborted.
 
-`--[no-]recurse-submodules`::
+`--recurse-submodules`::
+`--no-recurse-submodules`::
        When the working tree is updated, using `--recurse-submodules` will
        also recursively reset the working tree of all active submodules
        according to the commit recorded in the superproject, also setting
index 5335502d68fc7b84889e48d66daefd65d48a5d47..11b1ab1a070af8921bc49af9ea9953a5cda9c951 100644 (file)
@@ -115,7 +115,8 @@ illustration below where `[PATCH v2 0/3]` is in reply to `[PATCH 0/2]`:
 Only necessary if `--compose` is also set.  If `--compose`
 is not set, this will be prompted for.
 
---[no-]outlook-id-fix::
+--outlook-id-fix::
+--no-outlook-id-fix::
        Microsoft Outlook SMTP servers discard the Message-ID sent via email and
        assign a new random Message-ID, thus breaking threads.
 +
@@ -350,7 +351,8 @@ Automating
 --no-header-cmd::
        Disable any header command in use.
 
---[no-]chain-reply-to::
+--chain-reply-to::
+--no-chain-reply-to::
        If this is set, each email will be sent as a reply to the previous
        email sent.  If disabled with `--no-chain-reply-to`, all emails after
        the first will be sent as replies to the first email sent.  When using
@@ -364,19 +366,22 @@ Automating
        values in the `sendemail` section. The default identity is
        the value of `sendemail.identity`.
 
---[no-]signed-off-by-cc::
+--signed-off-by-cc::
+--no-signed-off-by-cc::
        If this is set, add emails found in the `Signed-off-by` trailer or `Cc:`
        lines to the cc list. Default is the value of `sendemail.signedOffByCc`
        configuration value; if that is unspecified, default to
        `--signed-off-by-cc`.
 
---[no-]cc-cover::
+--cc-cover::
+--no-cc-cover::
        If this is set, emails found in `Cc:` headers in the first patch of
        the series (typically the cover letter) are added to the cc list
        for each email set. Default is the value of `sendemail.ccCover`
        configuration value; if that is unspecified, default to `--no-cc-cover`.
 
---[no-]to-cover::
+--to-cover::
+--no-to-cover::
        If this is set, emails found in `To:` headers in the first patch of
        the series (typically the cover letter) are added to the to list
        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
 that is unspecified, default to `self` if `--suppress-from` is
 specified, as well as `body` if `--no-signed-off-cc` is specified.
 
---[no-]suppress-from::
+--suppress-from::
+--no-suppress-from::
        If this is set, do not add the `From:` address to the `Cc:` list.
        Default is the value of `sendemail.suppressFrom` configuration
        value; if that is unspecified, default to `--no-suppress-from`.
 
---[no-]thread::
+--thread::
+--no-thread::
        If this is set, the `In-Reply-To` and `References` headers will be
        added to each email sent.  Whether each mail refers to the
        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
 Failure to do so may not produce the expected result in the
 recipient's MUA.
 
---[no-]mailmap::
+--mailmap::
+--no-mailmap::
        Use the mailmap file (see linkgit:gitmailmap[5]) to map all
        addresses to their canonical real name and email address. Additional
        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`.
 --dry-run::
        Do everything except actually send the emails.
 
---[no-]format-patch::
+--format-patch::
+--no-format-patch::
        When an argument may be understood either as a reference or as a file name,
        choose to understand it as a format-patch argument (`--format-patch`)
        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`.
        Make `git send-email` less verbose.  One line per email should be
        all that is output.
 
---[no-]validate::
+--validate::
+--no-validate::
        Perform sanity checks on patches.
        Currently, validation means the following:
 +
index b9e73f2e77b1ccd35ac76ce075a59b362fa7f1dd..811193f16c33068a22c8b017b99010afcce09622 100644 (file)
@@ -71,7 +71,8 @@ be in a separate packet, and the list must end with a flush packet.
        fails to update then the entire push will fail without changing any
        refs.
 
---[no-]signed::
+--signed::
+--no-signed::
 --signed=(true|false|if-asked)::
        GPG-sign the push request to update refs on the receiving
        side, to allow it to be checked by the hooks and/or be
index 87d8e0f0c563b74acc880c2b7bee3c2c94086d05..2d6ac92ea45000c3194bbc6f9269a2fa49c1630a 100644 (file)
@@ -435,7 +435,8 @@ options carefully.
        clone with a history truncated to the specified number of revisions.
        See linkgit:git-clone[1]
 
---[no-]recommend-shallow::
+--recommend-shallow::
+--no-recommend-shallow::
        This option is only valid for the update command.
        The initial clone of a submodule will use the recommended
        `submodule.<name>.shallow` as provided by the `.gitmodules` file
@@ -447,7 +448,8 @@ options carefully.
        Clone new submodules in parallel with as many jobs.
        Defaults to the `submodule.fetchJobs` option.
 
---[no-]single-branch::
+--single-branch::
+--no-single-branch::
        This option is only valid for the update command.
        Clone only one branch during update: HEAD or one specified by --branch.
 
index 7128aed540581f37a8e06dec79ea720e3cfacd8c..9bea9fab9ad1fa2504f9f3a44860e95cac1aa564 100644 (file)
@@ -86,7 +86,8 @@ OPTIONS
 --chmod=(+|-)x::
         Set the execute permissions on the updated files.
 
---[no-]assume-unchanged::
+--assume-unchanged::
+--no-assume-unchanged::
        When this flag is specified, the object names recorded
        for the paths are not updated.  Instead, this option
        sets/unsets the "assume unchanged" bit for the
@@ -108,18 +109,21 @@ you will need to handle the situation manually.
        Like `--refresh`, but checks stat information unconditionally,
        without regard to the "assume unchanged" setting.
 
---[no-]skip-worktree::
+--skip-worktree::
+--no-skip-worktree::
        When one of these flags is specified, the object names recorded
        for the paths are not updated. Instead, these options
        set and unset the "skip-worktree" bit for the paths. See
        section "Skip-worktree bit" below for more information.
 
 
---[no-]ignore-skip-worktree-entries::
+--ignore-skip-worktree-entries::
+--no-ignore-skip-worktree-entries::
        Do not remove skip-worktree (AKA "index-only") entries even when
        the `--remove` option was specified.
 
---[no-]fsmonitor-valid::
+--fsmonitor-valid::
+--no-fsmonitor-valid::
        When one of these flags is specified, the object names recorded
        for the paths are not updated. Instead, these options
        set and unset the "fsmonitor valid" bit for the paths. See
index 516d1639d9d05cb0cb1aba71c9dcedd8d4e8e8c4..9167a321d08e51d21587110ea0e04ae597700f97 100644 (file)
@@ -25,7 +25,8 @@ repository.  For push operations, see 'git send-pack'.
 OPTIONS
 -------
 
---[no-]strict::
+--strict::
+--no-strict::
        Do not try <directory>/.git/ if <directory> is not a Git directory.
 
 --timeout=<n>::
index 8340b7f028e6c1c3bae3de0879e9754098466d14..389e669ac044de80849555bf6b73418f794f050a 100644 (file)
@@ -200,13 +200,15 @@ To remove a locked worktree, specify `--force` twice.
        With `add`, detach `HEAD` in the new worktree. See "DETACHED HEAD"
        in linkgit:git-checkout[1].
 
---[no-]checkout::
+--checkout::
+--no-checkout::
        By default, `add` checks out `<commit-ish>`, however, `--no-checkout` can
        be used to suppress checkout in order to make customizations,
        such as configuring sparse-checkout. See "Sparse checkout"
        in linkgit:git-read-tree[1].
 
---[no-]guess-remote::
+--guess-remote::
+--no-guess-remote::
        With `worktree add <path>`, without `<commit-ish>`, instead
        of creating a new branch from `HEAD`, if there exists a tracking
        branch in exactly one remote matching the basename of `<path>`,
@@ -216,7 +218,8 @@ To remove a locked worktree, specify `--force` twice.
 This can also be set up as the default behaviour by using the
 `worktree.guessRemote` config option.
 
---[no-]relative-paths::
+--relative-paths::
+--no-relative-paths::
        Link worktrees using relative paths or absolute paths (default).
        Overrides the `worktree.useRelativePaths` config option, see
        linkgit:git-config[1].
@@ -224,7 +227,8 @@ This can also be set up as the default behaviour by using the
 With `repair`, the linking files will be updated if there's an absolute/relative
 mismatch, even if the links are correct.
 
---[no-]track::
+--track::
+--no-track::
        When creating a new branch, if `<commit-ish>` is a branch,
        mark it as "upstream" from the new branch.  This is the
        default if `<commit-ish>` is a remote-tracking branch.  See
index 1f35a6a116da3c2e89d6c5f96682a79694822e91..11321a151bcaf6965f33d9ddf21007bf6deb06aa 100755 (executable)
@@ -18,6 +18,9 @@ while (my $line = <>) {
 
                report($line, "multiple parameters in a definition list item");
        }
+       if ($line =~ /^`?--\[no-\][a-z0-9-]+.*(::|;;)$/) {
+               report($line, "definition list item with a `--[no-]` parameter");
+       }
 }
 
 
index 95ef491be109e09a40a4ed2e68944607efbf5ba9..9d433265b2984bfc0eb97902e21ee9f5ce70ccaa 100644 (file)
@@ -135,7 +135,8 @@ ifdef::git-pull[]
 Only useful when merging.
 endif::git-pull[]
 
-`--[no-]verify`::
+`--verify`::
+`--no-verify`::
        By default, the pre-merge and commit-msg hooks are run.
        When `--no-verify` is given, these are bypassed.
        See also linkgit:githooks[5].
index 4bd5b150e8e1d4561ff48fb000748caeb00f27a8..f81b2832f8dfeb13657e6b9028ed039ec808cdc1 100644 (file)
@@ -71,7 +71,8 @@ HEAD[:<directory>]`.
        Instead of checking out the branch pointed to by the cloned
        repository's HEAD, check out the `<name>` branch instead.
 
---[no-]single-branch::
+--single-branch::
+--no-single-branch::
        Clone only the history leading to the tip of a single branch, either
        specified by the `--branch` option or the primary branch remote's
        `HEAD` points at.
@@ -81,23 +82,27 @@ remote-tracking branch for the branch this option was used for the initial
 cloning. If the HEAD at the remote did not point at any branch when
 `--single-branch` clone was made, no remote-tracking branch is created.
 
---[no-]src::
+--src::
+--no-src::
        By default, `scalar clone` places the cloned repository within a
        `<entlistment>/src` directory. Use `--no-src` to place the cloned
        repository directly in the `<enlistment>` directory.
 
---[no-]tags::
+--tags::
+--no-tags::
        By default, `scalar clone` will fetch the tag objects advertised by
        the remote and future `git fetch` commands will do the same. Use
        `--no-tags` to avoid fetching tags in `scalar clone` and to configure
        the repository to avoid fetching tags in the future. To fetch tags after
        cloning with `--no-tags`, run `git fetch --tags`.
 
---[no-]full-clone::
+--full-clone::
+--no-full-clone::
        A sparse-checkout is initialized by default. This behavior can be
        turned off via `--full-clone`.
 
---[no-]maintenance::
+--maintenance::
+--no-maintenance::
        By default, `scalar clone` configures the enlistment to use Git's
        background maintenance feature. Use the `--no-maintenance` to skip
        this configuration.
@@ -122,7 +127,8 @@ Note: when this subcommand is called in a worktree that is called `src/`, its
 parent directory is considered to be the Scalar enlistment. If the worktree is
 _not_ called `src/`, it itself will be considered to be the Scalar enlistment.
 
---[no-]maintenance::
+--maintenance::
+--no-maintenance::
        By default, `scalar register` configures the enlistment to use Git's
        background maintenance feature. Use the `--no-maintenance` to skip
        this configuration. This does not disable any maintenance that may