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

Re: [PATCH 1/2] submodule documentation: add options to the subcommand

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 2, 2016, 21:45 UTC
Message-ID
<xmqqtwf2c0aw.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160802182152.20637-1-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
> When reading up on a subcommand of `gi submodule`, it is convenient
s/gi /git /;
> to have its options nearby and not just at the top of the man page.
> Add the options to each subcommand.
>
> While at it, also document the `--checkout` option for `update`.

I do find the resulting per-subcommand description easier to read with this change.

Perhaps we want to go one step further and change the SYNOPSIS so that per-subcommand options are not described there at all? I.e.e.g.

-    'git submodule' [--quiet] update [--init] [--remote] [-N|--no-fetch]...
+    'git submodule' [--quiet] update [<option>...]
Show 9 quoted lines
> @@ -231,7 +231,7 @@ As an example, +git submodule foreach \'echo $path {backtick}git
>  rev-parse HEAD{backtick}'+ will show the path and currently checked out
>  commit for each submodule.
>  
> -sync::
> +sync [--recursive] [--] [<path>...]::
>  	Synchronizes submodules' remote URL configuration setting
>  	to the value specified in .gitmodules. It will only affect those
>  	submodules which already have a URL entry in .git/config (that is the
Previous: Stefan BellerNext: Stefan Beller
Message 3 of 5 in “submodule documentation: add options to the subcommand”
  1. 1/2 submodule documentation: add options to the subcommandStefan Beller, Aug 2, 2016
  2. 2/2 submodule update documentation: don't repeat ourselvesStefan Beller, Aug 2, 2016
  3. Junio C HamanoAug 2, 2016
  4. Stefan BellerAug 2, 2016
  5. Junio C HamanoAug 2, 2016

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.