summaryrefslogtreecommitdiff
path: root/Documentation/git-sparse-checkout.txt
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2022-04-22 02:32:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-04-22 06:12:38 (GMT)
commitf69dfef355aec867693deb68376a08e97303d61c (patch)
treeccfb7df6f1d9d3827ae37d0ebdab4ef03826cb33 /Documentation/git-sparse-checkout.txt
parent2d95707a02ffd68933f8af0fa76090bea908d376 (diff)
downloadgit-f69dfef355aec867693deb68376a08e97303d61c.zip
git-f69dfef355aec867693deb68376a08e97303d61c.tar.gz
git-f69dfef355aec867693deb68376a08e97303d61c.tar.bz2
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>
Diffstat (limited to 'Documentation/git-sparse-checkout.txt')
-rw-r--r--Documentation/git-sparse-checkout.txt31
1 files changed, 15 insertions, 16 deletions
diff --git a/Documentation/git-sparse-checkout.txt b/Documentation/git-sparse-checkout.txt
index 7308e74..b5db812 100644
--- a/Documentation/git-sparse-checkout.txt
+++ b/Documentation/git-sparse-checkout.txt
@@ -44,9 +44,9 @@ COMMANDS
Enable the necessary sparse-checkout config settings
(`core.sparseCheckout`, `core.sparseCheckoutCone`, and
`index.sparse`) if they are not already set to the desired values,
- and write a set of patterns to the sparse-checkout file from the
- list of arguments following the 'set' subcommand. Update the
- working directory to match the new patterns.
+ populate the sparse-checkout file from the list of arguments
+ following the 'set' subcommand, and update the working directory to
+ match.
+
To ensure that adjusting the sparse-checkout settings within a worktree
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
read from standard in as a newline-delimited list instead of from the
arguments.
+
-When `--cone` is passed or `core.sparseCheckoutCone` is not false, the
-input list is considered a list of directories. This allows for
-better performance with a limited set of patterns (see 'CONE PATTERN
-SET' below). The input format matches the output of `git ls-tree
---name-only`. This includes interpreting pathnames that begin with a
-double quote (") as C-style quoted strings. Note that the set command
-will write patterns to the sparse-checkout file to include all files
-contained in those directories (recursively) as well as files that are
-siblings of ancestor directories.
+By default, the input list is considered a list of directories, matching
+the output of `git ls-tree -d --name-only`. This includes interpreting
+pathnames that begin with a double quote (") as C-style quoted strings.
+Note that all files under the specified directories (at any depth) will
+be included in the sparse checkout, as well as files that are siblings
+of either the given directory or any of its ancestors (see 'CONE PATTERN
+SET' below for more details). In the past, this was not the default,
+and `--cone` needed to be specified or `core.sparseCheckoutCone` needed
+to be enabled.
+
When `--no-cone` is passed or `core.sparseCheckoutCone` is set to false,
the input list is considered a list of patterns. This mode is harder
@@ -208,10 +208,9 @@ the following patterns:
This says "include everything in root, but nothing two levels below root."
When in cone mode, the `git sparse-checkout set` subcommand takes a list of
-directories instead of a list of sparse-checkout patterns. In this mode,
-the command `git sparse-checkout set A/B/C` sets the directory `A/B/C` as
-a recursive pattern, the directories `A` and `A/B` are added as parent
-patterns. The resulting sparse-checkout file is now
+directories. In this mode, the command `git sparse-checkout set A/B/C` sets
+the directory `A/B/C` as a recursive pattern, the directories `A` and `A/B`
+are added as parent patterns. The resulting sparse-checkout file is now
----------------
/*