git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC PATCH 1/1] Documentation/git-sparse-checkout.txt: add an OPTIONS section

From
Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
Date
Mar 11, 2022, 13:21 UTC
Message-ID
<20220311132141.1817-2-shaoxuan.yuan02@gmail.com>
In-Reply-To
<20220311132141.1817-1-shaoxuan.yuan02@gmail.com>

Add an OPTIONS section to the manual and move the descriptions about these options from COMMANDS to the section.

Signed-off-by: Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
---
 Documentation/git-sparse-checkout.txt | 63 +++++++++++++++++----------
 1 file changed, 39 insertions(+), 24 deletions(-)
diff --git a/Documentation/git-sparse-checkout.txt b/Documentation/git-sparse-checkout.txt
index 06f23660f6..0bc742cb3a 100644
--- a/Documentation/git-sparse-checkout.txt
+++ b/Documentation/git-sparse-checkout.txt
@@ -35,30 +35,11 @@ COMMANDS IN THE PRESENCE OF SPARSE-CHECKOUTS, WILL LIKELY CHANGE IN
 THE FUTURE.
 
 
-COMMANDS
---------
-'list'::
-	Describe the directories or patterns in the sparse-checkout file.
-
-'set'::
-	Enable the necessary sparse-checkout config settings
-	(`core.sparseCheckout`, `core.sparseCheckoutCone`, and
-	`index.sparse`) if they are not already set to the desired values,
-	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'
-subcommand will upgrade your repository config to use worktree-specific
-config if not already present. The sparsity defined by the arguments to
-the 'set' subcommand are stored in the worktree-specific sparse-checkout
-file. See linkgit:git-worktree[1] and the documentation of
-`extensions.worktreeConfig` in linkgit:git-config[1] for more details.
-+
-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.
+OPTIONS
+-------
+'--[no-]cone'::
+	Use with ['set'|'reapply'].
+	Specify using cone mode or not. The default is to use cone mode.
 +
 By default, the input list is considered a list of directories, matching
 the output of `git ls-tree -d --name-only`.  This includes interpreting
@@ -78,6 +59,11 @@ with the `--sparse-index` option, and will likely be incompatible with
 other new features as they are added.  See the "Non-cone Problems"
 section below and the "Sparse Checkout" section of
 linkgit:git-read-tree[1] for more details.
+
+'--[no-]sparse-index'::
+	Use with ['set'|'reapply'].
+	Specify using a sparse index or not. The default is to not use a 
+	sparse index.
 +
 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
@@ -94,6 +80,35 @@ to rewrite your index to not be sparse. Older versions of Git will not
 understand the sparse directory entries index extension and may fail to
 interact with your repository until it is disabled.
 
+'--stdin'::
+	Use with ['set'|'add'].
++
+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.
+
+
+COMMANDS
+--------
+'list'::
+	Describe the directories or patterns in the sparse-checkout file.
+
+'set'::
+	Enable the necessary sparse-checkout config settings
+	(`core.sparseCheckout`, `core.sparseCheckoutCone`, and
+	`index.sparse`) if they are not already set to the desired values,
+	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'
+subcommand will upgrade your repository config to use worktree-specific
+config if not already present. The sparsity defined by the arguments to
+the 'set' subcommand are stored in the worktree-specific sparse-checkout
+file. See linkgit:git-worktree[1] and the documentation of
+`extensions.worktreeConfig` in linkgit:git-config[1] for more details.
+
 'add'::
 	Update the sparse-checkout file to include additional directories
 	(in cone mode) or patterns (in non-cone mode).  By default, these
-- 
2.35.1
Previous: Shaoxuan YuanNext: Derrick Stolee
Message 2 of 18 in “Documentation/git-sparse-checkout.txt: add an OPTIONS section”
  1. 0/1 Documentation/git-sparse-checkout.txt: add an OPTIONS sectionShaoxuan Yuan, Mar 11, 2022
  2. 1/1 Documentation/git-sparse-checkout.txt: add an OPTIONS sectionShaoxuan Yuan, Mar 11, 2022
  3. Derrick StoleeMar 11, 2022
  4. 0/1 Documentation/git-sparse-checkout.txt: add an OPTIONS sectionShaoxuan Yuan, Mar 14, 2022
  5. 1/1 Documentation/git-sparse-checkout.txt: add an OPTIONS sectionShaoxuan Yuan, Mar 14, 2022
  6. 0/1 Documentation/git-sparse-checkout.txt: add an OPTIONS sectionShaoxuan Yuan, Mar 14, 2022
  7. 1/1 Documentation/git-sparse-checkout.txt: add an OPTIONS sectionShaoxuan Yuan, Mar 14, 2022
  8. Derrick StoleeMar 14, 2022
  9. 0/1 Documentation/git-sparse-checkout.txt: add an OPTIONS sectionShaoxuan Yuan, Mar 17, 2022
  10. 1/1 Documentation/git-sparse-checkout.txt: add an OPTIONS sectionShaoxuan Yuan, Mar 17, 2022
  11. Junio C HamanoMar 18, 2022
  12. Junio C HamanoMar 18, 2022
  13. 0/4 Documentation/git-sparse-checkout.txt: add an OPTIONS sectionShaoxuan Yuan, Mar 19, 2022
  14. 1/4 Documentation/git-sparse-checkout.txt: add an OPTIONS sectionShaoxuan Yuan, Mar 19, 2022
  15. 3/4 Documentation/git-sparse-checkout.txt: some reword and modificationsShaoxuan Yuan, Mar 19, 2022
  16. 4/4 Documentation/git-sparse-checkout.txt: some reword and modificationsShaoxuan Yuan, Mar 19, 2022
  17. 2/4 Documentation/git-sparse-checkout.txt: move OPTIONS after COMMANDSShaoxuan Yuan, Mar 19, 2022
  18. Derrick StoleeMar 22, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.