summaryrefslogtreecommitdiff
path: root/Documentation/git-sparse-checkout.txt
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2022-04-22 02:32:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-04-22 06:12:38 (GMT)
commit0d86f59a3c7ce06bebb44a691cf8743e8eda1fbe (patch)
treeaf785dc7c87df5e276076197e7041477e4a30ec1 /Documentation/git-sparse-checkout.txt
parent71ceb816b3d22953c63f3d71b6c8e5d016ece958 (diff)
downloadgit-0d86f59a3c7ce06bebb44a691cf8743e8eda1fbe.zip
git-0d86f59a3c7ce06bebb44a691cf8743e8eda1fbe.tar.gz
git-0d86f59a3c7ce06bebb44a691cf8743e8eda1fbe.tar.bz2
git-sparse-checkout.txt: shuffle some sections and mark as internal
With cone mode as the default, it makes sense to discuss it before non-cone mode. Also, the new default means we can just use directories in most cases and users do not need to understand patterns or their meanings. Let's take advantage of this to mark several sections as "INTERNALS", notifying the user that they do not need to know all those details in order to make use of the sparse-checkout command. 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.txt48
1 files changed, 24 insertions, 24 deletions
diff --git a/Documentation/git-sparse-checkout.txt b/Documentation/git-sparse-checkout.txt
index 8e80d1c..2083e6d 100644
--- a/Documentation/git-sparse-checkout.txt
+++ b/Documentation/git-sparse-checkout.txt
@@ -73,8 +73,8 @@ to be enabled.
When `--no-cone` is passed, the input list is considered a list of
patterns. This mode is harder to use and less performant, and is thus
not recommended. See the "Sparse Checkout" section of
-linkgit:git-read-tree[1] and the "Pattern Set" sections below for more
-details.
+linkgit:git-read-tree[1] and the "Internals...Pattern Set" sections
+below for more details.
+
Use the `--[no-]sparse-index` option to use a sparse index (the
default is to not use it). A sparse index reduces the size of the
@@ -136,8 +136,8 @@ paths to pass to a subsequent 'set' or 'add' command. However,
the disable command, so the easy restore of calling a plain `init`
decreased in utility.
-SPARSE CHECKOUT
----------------
+INTERNALS -- SPARSE CHECKOUT
+----------------------------
"Sparse checkout" allows populating the working directory sparsely. It
uses the skip-worktree bit (see linkgit:git-update-index[1]) to tell Git
@@ -161,24 +161,8 @@ To repopulate the working directory with all files, use the
`git sparse-checkout disable` command.
-FULL PATTERN SET
-----------------
-
-By default, the sparse-checkout file uses the same syntax as `.gitignore`
-files.
-
-While `$GIT_DIR/info/sparse-checkout` is usually used to specify what
-files are included, you can also specify what files are _not_ included,
-using negative patterns. For example, to remove the file `unwanted`:
-
-----------------
-/*
-!unwanted
-----------------
-
-
-CONE PATTERN SET
-----------------
+INTERNALS -- CONE PATTERN SET
+-----------------------------
The full pattern set allows for arbitrary pattern matches and complicated
inclusion/exclusion rules. These can result in O(N*M) pattern matches when
@@ -256,8 +240,24 @@ use `git add` and `git commit` to store them, then remove any remaining files
manually to ensure Git can behave optimally.
-SUBMODULES
-----------
+INTERNALS -- FULL PATTERN SET
+-----------------------------
+
+By default, the sparse-checkout file uses the same syntax as `.gitignore`
+files.
+
+While `$GIT_DIR/info/sparse-checkout` is usually used to specify what
+files are included, you can also specify what files are _not_ included,
+using negative patterns. For example, to remove the file `unwanted`:
+
+----------------
+/*
+!unwanted
+----------------
+
+
+INTERNALS -- SUBMODULES
+-----------------------
If your repository contains one or more submodules, then submodules
are populated based on interactions with the `git submodule` command.