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

Re: [PATCH 1/1] Documentation: Correct man page for the SHAs reported by 'submodule status'

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 23, 2019, 01:21 UTC
Message-ID
<xmqqo8x32xqv.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<0eabb27ba0c7a07bbf24f13f1766c0ff63995348.1574464285.git.gitgitgadget@gmail.com>

"Manish Goregaokar via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 25 quoted lines
> From: Manish Goregaokar <manishsmail@gmail.com>
>
> 'git submodule status' reports the SHAs expected by the parent project,
> not the SHAs that are actually checked out in the submodule. Checking
> out a new SHA in a submodule will not change the output of 'git
> submodule status' until you 'git add' the submodule.
>
> Signed-off-by: Manish Goregaokar <manishsmail@gmail.com>
> ---
>  Documentation/git-submodule.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
> index 0ed5c24dc1..31e089454a 100644
> --- a/Documentation/git-submodule.txt
> +++ b/Documentation/git-submodule.txt
> @@ -72,8 +72,8 @@ git-submodule will correctly locate the submodule using the relative
>  URL in `.gitmodules`.
>  
>  status [--cached] [--recursive] [--] [<path>...]::
> -	Show the status of the submodules. This will print the SHA-1 of the
> -	currently checked out commit for each submodule, along with the
> +	Show the status of the submodules. This will print the SHA-1
> +	recorded in the superproject for each submodule, along with the
>  	submodule path and the output of 'git describe' for the

Am I mistaken to say that neither the old or the new description is correct, depending on the use (or non-use) of the --cached option?

	... print the object name of the commit that is currently
	checked out, or the commit that is recorded in the
	superproject if `--cached` option is given, for each
	submodule, ...
perhaps?
Previous: Manish Goregaokar via GitGitGadgetNext: Manish Goregaokar
Message 3 of 6 in “doc: Correct man page for the SHAs reported by 'submodule status'”
  1. 0/1 doc: Correct man page for the SHAs reported by 'submodule status'Manish Goregaokar via GitGitGadget, Nov 22, 2019
  2. 1/1 Documentation: Correct man page for the SHAs reported by 'submodule status'Manish Goregaokar via GitGitGadget, Nov 22, 2019
  3. Junio C HamanoNov 23, 2019
  4. Manish GoregaokarNov 23, 2019
  5. 0/1 doc: Document 'git submodule status --cached'Manish Goregaokar via GitGitGadget, Nov 23, 2019
  6. 1/1 doc: Document 'git submodule status --cached'Manish Goregaokar via GitGitGadget, Nov 23, 2019

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.