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

Clarification on Submodule/Subproject naming

From
Stefan Beller <sbeller@google.com>
Date
Oct 6, 2015, 22:00 UTC
Message-ID
<CAGZ79kYyagjxyV0Da3FW3zWuJ+wD=FTPvzYebV7ER4TjTnMXpg@mail.gmail.com>

So a discussing started in a Gerrit change [1] if we want to name it submodule or subproject. We decided to stick with the git core convention of naming it subproject for now.

But that lead me to the question: What is the difference of a submodule and a subproject?

As far as I can tell they are synonyms (internally also called GIT_LINK, but we never expose that to the users), where the term submodule was coined later in the game, subproject being there as the first term introduced in version 1.5.

So is it worth to unify that same concept hiding between two names?

Looking through the code we cannot switch to submodule as the literal string "subproject" is used for diffs in the plumbing layer.

But getting rid of submodule is also not easy, as there is git-submodule.sh as a direct command.

So then there is also git subtree, which "allow subprojects to be included within a subdirectory of the main project, optionally including the subproject’s entire history." (the man page)

So can I understand a subproject as either a submodule or a subtree ? If so would it make sense to add an entry to gitglossary to state that subprojects are generic term for having some kind of structure? (a subdirectory containing independent stuff could be considered a subproject. i.e. We could make contrib/examples the historic-git subproject ?)

Any advice welcome! Stefan

[1] https://gerrit-review.googlesource.com/#/c/70948/
Next: Jacob Keller
Message 1 of 3 in “Clarification on Submodule/Subproject naming”
  1. Stefan BellerOct 6, 2015
  2. Jacob KellerOct 6, 2015
  3. Jens LehmannOct 7, 2015

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.