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

Re: [RFC-PATCHv2] submodules: add a background story

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 14, 2017, 23:31 UTC
Message-ID
<xmqqwpcs5ozc.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kaeVrW3_kUWWxBMztOPuWY_V6XP2SUDyw8mmQ6peFZwdw@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
> I claim that the exposure into .gitmodules combined with
> the extreme similarity to its path is confusing. Maybe this
> can be fixed by a different default name.
I think that this may be worth thinking about it further.

The names are something the end users are not supposed to change, and one way to ensure that is to make .gitmodules file a binary black box that can only be updated with a specialized tool---as long as the tool does not allow updating the "name" field, you wouldn't risk them mucking with it. Limiting the update to a specialized tool also would give us a single place to ensure that it is globally unique across the history of the project (well, at least the part of the history that is visible to your repository).

Of course, being "one way" to do so does not mean it is the only way, or it is the best way. Keeping the information in a text file lets you merge them more easily when you add a submodule B while I added a submodule C, for example, and having a human readble name lets us learn from the output of "git log -p .gitmodules" that the repository of the "linux-kernel" submodule we use in our appliance used to live at linux-2.6.git but has moved to linux.git over time (for the latter use case to work well, we cannot change the name to something unreadable by humans like uuid---discouraging people from modifying and making them unreadble are two different things).

Previous: Junio C HamanoNext: Brandon Williams
Message 9 of 10 in “[RFC-PATCHv2] submodules: add a background story”
  1. Stefan BellerFeb 9, 2017
  2. Junio C HamanoFeb 9, 2017
  3. Stefan BellerFeb 14, 2017
  4. Junio C HamanoFeb 14, 2017
  5. Stefan BellerFeb 14, 2017
  6. Junio C HamanoFeb 14, 2017
  7. Stefan BellerFeb 14, 2017
  8. Junio C HamanoFeb 14, 2017
  9. Junio C HamanoFeb 14, 2017
  10. Brandon WilliamsFeb 14, 2017

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.