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

[RFC] Configurable name(s) for .gitmodules

From
Ping Yin <pkufranky@gmail.com>
Date
Dec 7, 2007, 16:00 UTC
Message-ID
<46dff0320712070800j6dd83714j265b3f7b291b855c@mail.gmail.com>

I have a super project with many submodules. Each kind of role may check out different set of submodules. There are some common modules which are almost checked out by every role.

Here comes my question: how to implement this elegantly? If all submodules are put in the same .gitmodules, every role has to in the command line manually designate all submodules to be checked out. However, it's hard to remember which submodules is required by which role, not to mention the so huge .gitmodules. Maybe a script for each role can help, but it's a little ugly.

If the name for '.gitmodules' is configurable, we can check in modules.roleA and modules.roleB, etc. Then role A can designate the corresponding modules.roleA as .gitmodules. Furtherly, if mutiple names are allowed, for common modules, we can have modules.common and then submodule.defaultnames="modules.common, modules.roleA" to avoid duplicated module name entires in both modules.roleA and modules.roleB.

I have gone deeply into git-submodule.sh and see "GIT_CONFIG=.gitmodules" is used. However, configuable multiple names can't be implemented in this way.

Recap:
1. configurable name for '.gitmodules'
2. better to allow mutiple names
3. the implementation issue for mutiple names
-- 
Ping Yin
Next: Ping Yin
Message 1 of 5 in “[RFC] Configurable name(s) for .gitmodules”
  1. Ping YinDec 7, 2007
  2. Ping YinDec 10, 2007
  3. Sven VerdoolaegeDec 10, 2007
  4. Ping YinDec 10, 2007
  5. Ping YinDec 10, 2007

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.