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

Re: [RFD] Long term plan with submodule refs?

From
Stefan Beller <sbeller@google.com>
Date
Nov 10, 2017, 20:01 UTC
Message-ID
<CAGZ79kbBypJfDn28j2Z_SCFG9iCZnx-sWmH6D2vqnS+tNKpnBw@mail.gmail.com>
In-Reply-To
<CA+P7+xoA5KNW7PEiW0wZp-aohsKbnH8AGAvkk3Y3Ghv=Jhp+hw@mail.gmail.com>
Show 15 quoted lines
>
>>> Basically, a workflow where it's easier to have each submodule checked
>>> out at master, and we can still keep track of historical relationship
>>> of what commit was the submodule at some time ago, but without causing
>>> some of these headaches.
>>
>> So essentially a repo or otherwise parallel workflow just with the versioning
>> happening magically behind your back?
>
> Ideally, my developers would like to just have each submodule checked
> out at master.
>
> Ideally, I'd like to be able to checkout an old version of the parent
> project and have it recorded what version of the shared submodule was
> at at the time.

This sounds as if a "passive superproject" would work best for you, i.e. each commit in a submodule is bubbled up into the superproject, making a commit potentially even behind the scenes, such that the user interaction with the superproject would be none.

However this approach also sounds careless, as there is no precondition that e.g. the superproject builds with all the submodules as is; it is a mere tracking of "at this time we have the submodules arranged as such", whereas for the versioning aspect, you would want to have commit messages in the superproject saying *why* you bumped up a specific submodule. The user may not like to give such an explanation as they already wrote a commit message for the individual project.

Also this approach sounds like a local approach, as it is not clear to me, why you'd want to share the superproject history.

Show 8 quoted lines
> Ideally, my developers don't want to have to worry about knowing that
> they shouldn't "git add -a" or "git commit -a" when they have a
> submodule checked out at a different location from the parent projects
> gitlink.
>
> Thanks,
> Jake
>
Previous: Jacob KellerNext: Jacob Keller
Message 15 of 16 in “git-status reports relation to superproject”
  1. 0/4 git-status reports relation to superprojectStefan Beller, Nov 8, 2017
  2. 1/4 remote, revision: factor out exclusive counting between two commitsStefan Beller, Nov 8, 2017
  3. 3/4 submodule.c: get superprojects gitlink valueStefan Beller, Nov 8, 2017
  4. 4/4 git-status: report reference to superprojectStefan Beller, Nov 8, 2017
  5. 2/4 submodule.c: factor start_ls_files_dot_dot out of get_superproject_working_treeStefan Beller, Nov 8, 2017
  6. Jonathan TanNov 8, 2017
  7. [RFD] Long term plan with submodule refs?Stefan Beller, Nov 9, 2017
  8. Jonathan TanNov 9, 2017
  9. Junio C HamanoNov 9, 2017
  10. Junio C HamanoNov 9, 2017
  11. Stefan BellerNov 9, 2017
  12. Jacob KellerNov 9, 2017
  13. Stefan BellerNov 9, 2017
  14. Jacob KellerNov 10, 2017
  15. Stefan BellerNov 10, 2017
  16. Jacob KellerNov 11, 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.