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

Re: [RFC/PATCH] add update to branch support for "floating submodules"

From
ATAndreas T.Auer <andreas.t.auer_gtml_37453@ursus.ath.cx>
Date
Dec 12, 2011, 15:34 UTC
Message-ID
<4EE61EED.50604@ursus.ath.cx>
In-Reply-To
<CALFF=ZQKRgx_AodBQH17T9cSe_JFtoKie7DoMMfkTXCyCFospw@mail.gmail.com>
On 10.12.2011 16:27 Leif Gruenwoldt wrote:
Show 16 quoted lines
>  On Sat, Dec 10, 2011 at 1:30 AM, Junio C Hamano <gitster@pobox.com>
>  wrote:
>
> > So that use case does not sound like a good rationale to require
> > addition of floating submodules.
>
>  Ok I will try another scenario :)
>
>  Imagine again products A, B and C and a common library. The products
>   are in a stable state of development and track a stable branch of
>  the common lib. Then imagine an important security fix gets made to
>  the common library. On the next pull of products A, B, and C they get
>  this fix for free because they were floating. They didn't need to
>  communicate with the maintainer of the common repo to know this. In
>  fact they don't really care. They just want the latest stable code
>  for that release branch.

So you don't want to have a stale submodule as Junio suggested, which is older than the gitlinked commit in the superproject, but you want to have the newest stable version, which is not yet gitlinked in the superproject, right?

Wouldn't ( cd commonlib ; git pull stable ) instead of git submodule update commonlib work as you want?

To be able to configure this update behavior in .gitmodules for _some_ submodules, could be helpful in this case.

So you don't want to add a new commit to the products A, B and C repos whenever the stable branch of the submodule changes, but on the other hand when you commit changes to the products it would still make sense to update the gitlink to the current commonlib version together with your changes, too, right?

>  This is how package management on many linux systems works.
>  Dependencies get updated and all products reap the benefit (or
>  catastrophe) automatically.

If I have e.g. the Debian testing distro, which is more floating than the most other Linux distro releases, then I still get only those versions of the packages that are referenced by this "Debian testing" superproject, unless I specify a different superproject (e.g. "Debian unstable") to get a newer version, but they are still tracked in some superproject. I'm not aware of a way to get the newest version of a package before it is in some "superproject", except downloading it explictily somewhere else. But I don't think this is what you want.

Previous: Leif GruenwoldtNext: Leif Gruenwoldt
Message 8 of 27 in “add update to branch support for "floating submodules"”
  1. add update to branch support for "floating submodules"Heiko Voigt, Nov 9, 2011
  2. Junio C HamanoNov 9, 2011
  3. Heiko VoigtNov 29, 2011
  4. Leif GruenwoldtDec 10, 2011
  5. Jonathan NiederDec 10, 2011
  6. Junio C HamanoDec 10, 2011
  7. Leif GruenwoldtDec 10, 2011
  8. Andreas T.AuerDec 12, 2011
  9. Leif GruenwoldtDec 12, 2011
  10. Andreas T.AuerDec 12, 2011
  11. Leif GruenwoldtDec 12, 2011
  12. Jens LehmannDec 12, 2011
  13. Phil HordDec 12, 2011
  14. Marc BranchaudDec 13, 2011
  15. Jens LehmannDec 13, 2011
  16. Marc BranchaudDec 13, 2011
  17. Junio C HamanoDec 12, 2011
  18. Phil HordDec 13, 2011
  19. Jens LehmannDec 13, 2011
  20. Phil HordJan 30, 2012
  21. Jens LehmannJan 31, 2012
  22. Phil HordJan 31, 2012
  23. Jens LehmannFeb 1, 2012
  24. Phil HordFeb 6, 2012
  25. Jens LehmannFeb 6, 2012
  26. Brandon CaseyDec 13, 2011
  27. Gioele BarabucciDec 10, 2011

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.