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

Re: ''git submodule sync'' should not add uninitialized submodules to .git/config

From
Jens Lehmann <jens.lehmann@web.de>
Date
Jun 24, 2011, 06:17 UTC
Message-ID
<4E042BFA.3020909@web.de>
In-Reply-To
<4E03C7E5.4050008@gmx.net>
Am 24.06.2011 01:10, schrieb Andreas Köhler:
Show 5 quoted lines
> There are two minor issues for me left.
> (1) The man page of submodule sync talks about "all submodules" and not
> "registered submodules". I treated it as "subsequent init" and
> personally do not restrict the list of submodules, simply because my
> build would not work without them.
While investigating this I stumbled across that too, will post a patch.
Show 5 quoted lines
> (2) It is confusing to have registered submodules in .git/config without
> a matching gitlink. Say, you switch between branch a1 with a submodule s
> with url u1, to a branch without s, you git clean -xdff (url u1 is still
> in .git/config, right?), and then to a branch a2 with s pointing to url
> u2. This bugged me.

I think that is ok, because that way git remembers that the user cares about submodule s even when he switches to a branch where s doesn't exist. And the documentation is pretty clear that you'll have to use "git submodule sync" to update the url itself from u1 to u2 when needed.

Previous: Andreas KöhlerNext: Junio C Hamano
Message 7 of 15 in “''git submodule sync'' should not add uninitialized submodules to .git/config”
  1. Maarten BillemontJun 23, 2011
  2. Phil HordJun 23, 2011
  3. Junio C HamanoJun 23, 2011
  4. Jens LehmannJun 23, 2011
  5. Junio C HamanoJun 23, 2011
  6. Andreas KöhlerJun 23, 2011
  7. Jens LehmannJun 24, 2011
  8. Re* ''git submodule sync'' should not add uninitialized submodules to .git/configJunio C Hamano, Jun 24, 2011
  9. Jens LehmannJun 24, 2011
  10. submodule add: always initialize .git/config entryJens Lehmann, Jun 25, 2011
  11. Junio C HamanoJun 30, 2011
  12. submodule sync: do not auto-vivify uninteresting submoduleJens Lehmann, Jun 25, 2011
  13. Phil HordJun 23, 2011
  14. Junio C HamanoJun 23, 2011
  15. Phil HordJun 23, 2011

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.