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

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

From
Derrick Stolee <derrickstolee@github.com>
Date
Mar 11, 2022, 20:56 UTC
Message-ID
<dd9413da-1b8c-2adf-c471-e5fd4230375c@github.com>
In-Reply-To
<20220311132141.1817-2-shaoxuan.yuan02@gmail.com>
On 3/11/2022 8:21 AM, Shaoxuan Yuan wrote:
> Add an OPTIONS section to the manual and move the descriptions about
> these options from COMMANDS to the section.
This is a good goal.
> +OPTIONS
> +-------

However, there are a few issues with the current approach. First, I believe it would be better to start with COMMANDS, then OPTIONS.

To be fair, we are not consistent here. These commands use OPTIONS and then COMMANDS:

* git-commit-graph.txt
* git-remote.txt
* git-revert.txt
These use [SUB]COMMANDS and then OPTIONS:
* git-maintenance.txt
* git-notes.txt
* git-p4.txt
* git-stash.txt
* git-submodule.txt
* git-worktree.txt

My preference would be OPTIONS second (and we can clean up the other docs as #leftoverbits). In particular, I noticed that the SYNOPSIS for git-maintenance.txt is out of date.

Show 6 quoted lines
> +'--[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

The other issue is that this context is detailing information about the 'set' command and the input it takes. You'll want to make sure the information is properly grouped.

Show 7 quoted lines
> @@ -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'].

I do like these clear indicators of which commands allow this option. I wonder if it should instead be

	Use with the `set` and `reapply` commands.

Thanks, -Stolee

Previous: Shaoxuan YuanNext: Shaoxuan Yuan
Message 3 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.