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

Re: [PATCH 2/2] Introduce git submodule attached update

From
Francesco Pretto <ceztko@gmail.com>
Date
Jan 5, 2014, 21:46 UTC
Message-ID
<CALas-ijjzyRVuc0NaAS5QS98pX2198mv4HoHDacgYFYNLXbXFw@mail.gmail.com>
In-Reply-To
<20140105203349.GB3737@book.hvoigt.net>
2014/1/5 Heiko Voigt <hvoigt@hvoigt.net>:
>
> Could you please extend the description of your use-case so we can
> understand your goal better?
>
Just in case you missed the first patch iteration[1].
Show 5 quoted lines
> The following questions directly pop into my mind:
>
>  - What means the maintainer does not track the submodules sha1? Does
>    that mean the superproject always refers to submodule commits using
>    branches?

It means he doesn't need to control other developers commit to be checked out so he sets "submodule.<name>.ignore" to "all". In this way he and the developers can work actively in their submodule copy.

>  - What happens if you want to go back to an earlier revision? Lets say
>    a tagged release? How is ensured that you get the correct revision in
>    the submodules?

"submodule.<name>.branch" is one setting that is not copied in ".git/config" by "git submodule init". "git submodule update" will use the setting in ".gitmodules" if not overridden voluntarily by the developer in ".git/config". The maintainer can change that setting in ".gitmodules" and commit the change. Modifies will be propagated by the next "git pull && git submodule update" of the developer in the superproject.

>  - In which situations does the developer or maintainer switch between
>    your attached/detached mode?

The developer/maintainer does so optionally and voluntarily and it effects only its private working tree.

>  - What is the "repository branch" which is given to the developer by
>    the maintainer used for? Who creates this branch and who merges into
>    it?

The branch of course must exist prior submodule adding. In this use-case it does not really matter who creates it and who merges into it. Everyone with the right to merge into it has to work in the submodule seamlessly, as it was working on separate clone of the same repository used as the submodule.

>  - What are these subsequent "merge" or "rebase" update operations? Do
>    you mean everyone has submodule.name.update configured to merge or
>    rebase?
>

subsequent "merge" or "rebase" update operations are just the ones after the initial clone/checkout, nothing particular.

Greetings, Francesco

[1] http://marc.info/?l=git&m=138836829531511&w=2
Previous: Heiko VoigtNext: Heiko Voigt
Message 5 of 40 in “git-submodule.sh: Support 'checkout' as a valid update command”
  1. 1/2 git-submodule.sh: Support 'checkout' as a valid update commandFrancesco Pretto, Jan 5, 2014
  2. 2/2 Introduce git submodule attached updateFrancesco Pretto, Jan 5, 2014
  3. Francesco PrettoJan 5, 2014
  4. Heiko VoigtJan 5, 2014
  5. Francesco PrettoJan 5, 2014
  6. Heiko VoigtJan 6, 2014
  7. Francesco PrettoJan 6, 2014
  8. David EngsterJan 6, 2014
  9. W. Trevor KingJan 7, 2014
  10. W. Trevor KingJan 7, 2014
  11. Preferred local submodule branches (was: Introduce git submodule attached update)W. Trevor King, Jan 7, 2014
  12. W. Trevor KingJan 7, 2014
  13. W. Trevor KingJan 8, 2014
  14. W. Trevor KingJan 8, 2014
  15. 0/4 Preferred local submodule branchesW. Trevor King, Jan 9, 2014
  16. 1/4 submodule: Add helpers for configurable local branchesW. Trevor King, Jan 9, 2014
  17. 2/4 submodule: Teach 'update' to preserve local branchesW. Trevor King, Jan 9, 2014
  18. 3/4 submodule: Teach 'add' about a configurable local-branchW. Trevor King, Jan 9, 2014
  19. Francesco PrettoJan 15, 2014
  20. W. Trevor KingJan 15, 2014
  21. 4/4 submodule: Add a new 'checkout' commandW. Trevor King, Jan 9, 2014
  22. Tight submodule bindings (was: Preferred local submodule branches)W. Trevor King, Jan 12, 2014
  23. Jens LehmannJan 13, 2014
  24. W. Trevor KingJan 13, 2014
  25. Junio C HamanoJan 13, 2014
  26. W. Trevor KingJan 14, 2014
  27. Heiko VoigtJan 7, 2014
  28. W. Trevor KingJan 7, 2014
  29. Junio C HamanoJan 7, 2014
  30. Francesco PrettoJan 7, 2014
  31. Junio C HamanoJan 7, 2014
  32. Francesco PrettoJan 7, 2014
  33. Francesco PrettoJan 5, 2014
  34. Heiko VoigtJan 6, 2014
  35. W. Trevor KingJan 6, 2014
  36. Heiko VoigtJan 5, 2014
  37. W. Trevor KingJan 5, 2014
  38. Junio C HamanoJan 6, 2014
  39. Junio C HamanoJan 6, 2014
  40. Francesco PrettoJan 6, 2014

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.