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

Re: The meaning of the '+' before the submodule hash.

From
HZHongyi Zhao <hongyi.zhao@gmail.com>
Date
Apr 21, 2021, 14:36 UTC
Message-ID
<CAGP6POKTTBfrtsXEKi2P+xg0DLPNzo4+jRY+ySmJ0wOQFPdZpw@mail.gmail.com>
In-Reply-To
<YIA10O/BVrP3z/LK@nand.local>
On Wed, Apr 21, 2021 at 10:25 PM Taylor Blau <me@ttaylorr.com> wrote:
Show 14 quoted lines
>
> On Wed, Apr 21, 2021 at 10:19:25PM +0800, Hongyi Zhao wrote:
> > What's the meaning of the '+' sign at the beginning? Why do some
> > submodules have this symbol, but some submodules don't?
>
> There are three symbols, 'U', '-', and '+'. From the documentation [1],
> they mean:
>
>     Each SHA-1 will possibly be prefixed with `-` if the submodule is not
>     initialized, `+` if the currently checked out submodule commit does not
>     match the SHA-1 found in the index of the containing repository and `U`
>     if the submodule has merge conflicts.
>
> [1]: https://git-scm.com/docs/git-submodule#Documentation/git-submodule.txt-status--cached--recursive--ltpathgt82308203

Thank you very much for pointing out this document information to me. The above submodules status for my case were achieved by the following command:

$ git submodule update --init --recursive --remote

As you can see, this will cause the status denoted by '+', i.e., the currently checked out submodule commit does not match the SHA-1 found in the index of the containing repository. I'm not sure if this is harmful.

HY
> Thanks,
> Taylor
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China
Previous: Taylor Blau
Message 3 of 3 in “The meaning of the '+' before the submodule hash.”
  1. Hongyi ZhaoApr 21, 2021
  2. Taylor BlauApr 21, 2021
  3. Hongyi ZhaoApr 21, 2021

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.