aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git-clone.adoc
diff options
context:
space:
mode:
authorJean-Noël Avila <jn.avila@free.fr>2025-08-11 20:53:18 +0000
committerJunio C Hamano <gitster@pobox.com>2025-08-11 14:16:04 -0700
commit03a353bb9759a1c775ba70f1e9ee865fc38291c2 (patch)
treebb55e2ce67fd0d0c0056f89365eb25883b2ef29e /Documentation/git-clone.adoc
parented260220948595b1311d4639dbfc20f02c807fac (diff)
downloadgit-03a353bb9759a1c775ba70f1e9ee865fc38291c2.tar.xz
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>
Diffstat (limited to 'Documentation/git-clone.adoc')
-rw-r--r--Documentation/git-clone.adoc12
1 files changed, 8 insertions, 4 deletions
diff --git a/Documentation/git-clone.adoc b/Documentation/git-clone.adoc
index 222d558290..031b56f098 100644
--- a/Documentation/git-clone.adoc
+++ b/Documentation/git-clone.adoc
@@ -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