Skip to content

Commit 00e10e0

Browse files
newrengitster
authored andcommitted
doc: correct misleading descriptions for --shallow-exclude
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 a460ea4 (Merge branch 'nd/shallow-deepen', 2016-10-10). Fix the documentation to match the implementation. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5a875ff commit 00e10e0

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

Documentation/fetch-options.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
Deepen or shorten the history of a shallow repository to
3030
include all reachable commits after <date>.
3131

32-
--shallow-exclude=<revision>::
32+
--shallow-exclude=<ref>::
3333
Deepen or shorten the history of a shallow repository to
3434
exclude commits reachable from a specified remote branch or tag.
3535
This option can be specified multiple times.

Documentation/git-clone.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ corresponding `--mirror` and `--no-tags` options instead.
255255
`--shallow-since=<date>`::
256256
Create a shallow clone with a history after the specified time.
257257

258-
`--shallow-exclude=<revision>`::
258+
`--shallow-exclude=<ref>`::
259259
Create a shallow clone with a history, excluding commits
260260
reachable from a specified remote branch or tag. This option
261261
can be specified multiple times.

Documentation/git-fetch-pack.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ be in a separate packet, and the list must end with a flush packet.
9191
Deepen or shorten the history of a shallow repository to
9292
include all reachable commits after <date>.
9393

94-
--shallow-exclude=<revision>::
94+
--shallow-exclude=<ref>::
9595
Deepen or shorten the history of a shallow repository to
9696
exclude commits reachable from a specified remote branch or tag.
9797
This option can be specified multiple times.

builtin/clone.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ static struct option builtin_clone_options[] = {
147147
N_("create a shallow clone of that depth")),
148148
OPT_STRING(0, "shallow-since", &option_since, N_("time"),
149149
N_("create a shallow clone since a specific time")),
150-
OPT_STRING_LIST(0, "shallow-exclude", &option_not, N_("revision"),
151-
N_("deepen history of shallow clone, excluding rev")),
150+
OPT_STRING_LIST(0, "shallow-exclude", &option_not, N_("ref"),
151+
N_("deepen history of shallow clone, excluding ref")),
152152
OPT_BOOL(0, "single-branch", &option_single_branch,
153153
N_("clone only one branch, HEAD or --branch")),
154154
OPT_BOOL(0, "no-tags", &option_no_tags,

builtin/fetch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2216,8 +2216,8 @@ int cmd_fetch(int argc,
22162216
N_("deepen history of shallow clone")),
22172217
OPT_STRING(0, "shallow-since", &deepen_since, N_("time"),
22182218
N_("deepen history of shallow repository based on time")),
2219-
OPT_STRING_LIST(0, "shallow-exclude", &deepen_not, N_("revision"),
2220-
N_("deepen history of shallow clone, excluding rev")),
2219+
OPT_STRING_LIST(0, "shallow-exclude", &deepen_not, N_("ref"),
2220+
N_("deepen history of shallow clone, excluding ref")),
22212221
OPT_INTEGER(0, "deepen", &deepen_relative,
22222222
N_("deepen history of shallow clone")),
22232223
OPT_SET_INT_F(0, "unshallow", &unshallow,

builtin/pull.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ static struct option pull_options[] = {
218218
OPT_PASSTHRU_ARGV(0, "shallow-since", &opt_fetch, N_("time"),
219219
N_("deepen history of shallow repository based on time"),
220220
0),
221-
OPT_PASSTHRU_ARGV(0, "shallow-exclude", &opt_fetch, N_("revision"),
222-
N_("deepen history of shallow clone, excluding rev"),
221+
OPT_PASSTHRU_ARGV(0, "shallow-exclude", &opt_fetch, N_("ref"),
222+
N_("deepen history of shallow clone, excluding ref"),
223223
0),
224224
OPT_PASSTHRU_ARGV(0, "deepen", &opt_fetch, N_("n"),
225225
N_("deepen history of shallow clone"),

0 commit comments

Comments
 (0)