git-sparse-checkout.txt: wording updates for the cone mode default

Now that cone mode is the default, we'd like to focus on the arguments to set/add being directories rather than patterns, and it probably makes sense to provide an earlier heads up that files from leading directories get included as well. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Apr 22, 2022 at 02:32 UTC f69dfef355aec867693deb68376a08e97303d61c
1 file changed +15 -16
Documentation/git-sparse-checkout.txt
+15 -16
@@ -44,9 +44,9 @@ COMMANDS
44 Enable the necessary sparse-checkout config settings
45 (`core.sparseCheckout`, `core.sparseCheckoutCone`, and
46 `index.sparse`) if they are not already set to the desired values,
47 - and write a set of patterns to the sparse-checkout file from the
48 - list of arguments following the 'set' subcommand. Update the
49 - working directory to match the new patterns.
47 + populate the sparse-checkout file from the list of arguments
48 + following the 'set' subcommand, and update the working directory to
49 + match.
50 +
51 To ensure that adjusting the sparse-checkout settings within a worktree
52 does not alter the sparse-checkout settings in other worktrees, the 'set'
@@ -60,15 +60,15 @@ When the `--stdin` option is provided, the directories or patterns are
60 read from standard in as a newline-delimited list instead of from the
61 arguments.
62 +
63 -When `--cone` is passed or `core.sparseCheckoutCone` is not false, the
64 -input list is considered a list of directories. This allows for
65 -better performance with a limited set of patterns (see 'CONE PATTERN
66 -SET' below). The input format matches the output of `git ls-tree
67 ---name-only`. This includes interpreting pathnames that begin with a
68 -double quote (") as C-style quoted strings. Note that the set command
69 -will write patterns to the sparse-checkout file to include all files
70 -contained in those directories (recursively) as well as files that are
71 -siblings of ancestor directories.
63 +By default, the input list is considered a list of directories, matching
64 +the output of `git ls-tree -d --name-only`. This includes interpreting
65 +pathnames that begin with a double quote (") as C-style quoted strings.
66 +Note that all files under the specified directories (at any depth) will
67 +be included in the sparse checkout, as well as files that are siblings
68 +of either the given directory or any of its ancestors (see 'CONE PATTERN
69 +SET' below for more details). In the past, this was not the default,
70 +and `--cone` needed to be specified or `core.sparseCheckoutCone` needed
71 +to be enabled.
72 +
73 When `--no-cone` is passed or `core.sparseCheckoutCone` is set to false,
74 the input list is considered a list of patterns. This mode is harder
@@ -208,10 +208,9 @@ the following patterns:
208 This says "include everything in root, but nothing two levels below root."
209
210 When in cone mode, the `git sparse-checkout set` subcommand takes a list of
211 -directories instead of a list of sparse-checkout patterns. In this mode,
212 -the command `git sparse-checkout set A/B/C` sets the directory `A/B/C` as
213 -a recursive pattern, the directories `A` and `A/B` are added as parent
214 -patterns. The resulting sparse-checkout file is now
211 +directories. In this mode, the command `git sparse-checkout set A/B/C` sets
212 +the directory `A/B/C` as a recursive pattern, the directories `A` and `A/B`
213 +are added as parent patterns. The resulting sparse-checkout file is now
214
215 ----------------
216 /*