]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: correct misleading descriptions for --shallow-exclude
authorElijah Newren <newren@gmail.com>
Mon, 4 Nov 2024 19:02:44 +0000 (19:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 Nov 2024 06:53:23 +0000 (22:53 -0800)
The documentation for the --shallow-exclude option to clone/fetch/etc.
claims that the option takes a revision, but it does not.  As per
upload-pack.c's process_deepen_not(), it passes the option to
expand_ref() and dies if it does not find exactly one ref matching the
name passed.  Further, this has always been the case ever since these
options were introduced by the commits merged in a460ea4a3cb1 (Merge
branch 'nd/shallow-deepen', 2016-10-10).  Fix the documentation to
match the implementation.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/fetch-options.txt
Documentation/git-clone.txt
Documentation/git-fetch-pack.txt
builtin/clone.c
builtin/fetch.c
builtin/pull.c

index 9dc7ac8dbdc4ca98e2f2d314c082fdebbd0b36ab..b01372e4b3c6595beb2e16d53322b08c09291c90 100644 (file)
@@ -29,7 +29,7 @@
        Deepen or shorten the history of a shallow repository to
        include all reachable commits after <date>.
 
---shallow-exclude=<revision>::
+--shallow-exclude=<ref>::
        Deepen or shorten the history of a shallow repository to
        exclude commits reachable from a specified remote branch or tag.
        This option can be specified multiple times.
index 116ad64820114b34e68de72ace30a7f562b599cd..7acb4cb17618c6cbee5d6ebe41a53be03ebfaa6c 100644 (file)
@@ -255,7 +255,7 @@ corresponding `--mirror` and `--no-tags` options instead.
 `--shallow-since=<date>`::
        Create a shallow clone with a history after the specified time.
 
-`--shallow-exclude=<revision>`::
+`--shallow-exclude=<ref>`::
        Create a shallow clone with a history, excluding commits
        reachable from a specified remote branch or tag.  This option
        can be specified multiple times.
index b3467664d30bde111af06ec0e915e6def2b1b4b2..b5223576a7508830aebd36c132a0abc82447ff42 100644 (file)
@@ -91,7 +91,7 @@ be in a separate packet, and the list must end with a flush packet.
        Deepen or shorten the history of a shallow repository to
        include all reachable commits after <date>.
 
---shallow-exclude=<revision>::
+--shallow-exclude=<ref>::
        Deepen or shorten the history of a shallow repository to
        exclude commits reachable from a specified remote branch or tag.
        This option can be specified multiple times.
index 59fcb317a68a77eee3ca96a60720c556e044c369..c0013c75cdc7672abced893c36d2aaf4ff246045 100644 (file)
@@ -147,8 +147,8 @@ static struct option builtin_clone_options[] = {
                    N_("create a shallow clone of that depth")),
        OPT_STRING(0, "shallow-since", &option_since, N_("time"),
                    N_("create a shallow clone since a specific time")),
-       OPT_STRING_LIST(0, "shallow-exclude", &option_not, N_("revision"),
-                       N_("deepen history of shallow clone, excluding rev")),
+       OPT_STRING_LIST(0, "shallow-exclude", &option_not, N_("ref"),
+                       N_("deepen history of shallow clone, excluding ref")),
        OPT_BOOL(0, "single-branch", &option_single_branch,
                    N_("clone only one branch, HEAD or --branch")),
        OPT_BOOL(0, "no-tags", &option_no_tags,
index d9027e4dc9245a32a87c47d89f9a29fcfd42534c..18eff4e5fa1f787b2f91a82de9098450de407655 100644 (file)
@@ -2216,8 +2216,8 @@ int cmd_fetch(int argc,
                           N_("deepen history of shallow clone")),
                OPT_STRING(0, "shallow-since", &deepen_since, N_("time"),
                           N_("deepen history of shallow repository based on time")),
-               OPT_STRING_LIST(0, "shallow-exclude", &deepen_not, N_("revision"),
-                               N_("deepen history of shallow clone, excluding rev")),
+               OPT_STRING_LIST(0, "shallow-exclude", &deepen_not, N_("ref"),
+                               N_("deepen history of shallow clone, excluding ref")),
                OPT_INTEGER(0, "deepen", &deepen_relative,
                            N_("deepen history of shallow clone")),
                OPT_SET_INT_F(0, "unshallow", &unshallow,
index 388ef3d1306befe005a501145aadfeb66c23c337..edc56907aa252a092a63a5c963b62c9f1fb64aaa 100644 (file)
@@ -218,8 +218,8 @@ static struct option pull_options[] = {
        OPT_PASSTHRU_ARGV(0, "shallow-since", &opt_fetch, N_("time"),
                N_("deepen history of shallow repository based on time"),
                0),
-       OPT_PASSTHRU_ARGV(0, "shallow-exclude", &opt_fetch, N_("revision"),
-               N_("deepen history of shallow clone, excluding rev"),
+       OPT_PASSTHRU_ARGV(0, "shallow-exclude", &opt_fetch, N_("ref"),
+               N_("deepen history of shallow clone, excluding ref"),
                0),
        OPT_PASSTHRU_ARGV(0, "deepen", &opt_fetch, N_("n"),
                N_("deepen history of shallow clone"),