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

Submodule usability

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Sep 29, 2007, 17:24 UTC
Message-ID
<Pine.LNX.4.64.0709291302240.5926@iabervon.org>

Would it be feasible in general to have "git status" cascade into submodules if they're checked out? As it is now, in a project with submodules, a "git commit -a" at the top can create a commit that lacks changes that are in the working tree and aren't mentioned to the user at all, which is a sure recipe for a stream of "add the change I forgot to add last time" follow-up commits.

While I'm on that topic, I think I want an "includesfile" config option that specifies patterns that should never be present untracked (but only as per-user configuration, since I think that's exclusively a matter of personal taste). I'll probably code this up myself unless I've missed somebody else doing it already. My first guess at effect is -a adds them, and they appear as "not added" in the "modified" section of status output instead of the "untracked" section.

Also, would it be reasonable to have a gitmodules option for submodules that the supermodule doesn't make sense without? E.g., multiple projects are now using kbuild as their build system, so, in order to share improvements to kbuild between projects, it would be useful to have it as a submodule. But, by default, the kernel wouldn't come with its build system any more, which would be a pain. So have a tracked option for the submodule that says that, when checking out the superproject, this particular subproject should be updated automatically.

	-Daniel
*This .sig left intentionally blank*
Next: Sam Ravnborg
Message 1 of 3 in “Submodule usability”
  1. Daniel BarkalowSep 29, 2007
  2. Sam RavnborgSep 29, 2007
  3. Daniel BarkalowSep 29, 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.