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

Re: Auto update submodules after merge and reset

From
Jens Lehmann <jens.lehmann@web.de>
Date
Dec 13, 2011, 07:52 UTC
Message-ID
<4EE70427.3010605@web.de>
In-Reply-To
<CABURp0r37+VHBVVKepHPC4jwa-wJ0b+qwLrhhFR8KXnMQYTT3w@mail.gmail.com>
Am 13.12.2011 00:43, schrieb Phil Hord:
Show 11 quoted lines
> On Mon, Dec 12, 2011 at 5:39 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>> Am 11.12.2011 22:15, schrieb Andreas T.Auer:
>>> In http://thread.gmane.org/gmane.comp.version-control.git/183837 was discussed whether the gitlink in the superproject should be set to all-zero if updates follow the tip or maybe use the SHA1 of the commit when the submodule was added. I think the gitlink should be updated everytime when a new commit in the superproject is created.
>>
>> Nope, only when "git submodule update" is run. Otherwise you'll spray the
>> history with submodule updates totally unrelated to the commits in the
>> superproject, which is rather confusing.
> 
> And this is why my superproject is a makefile, a .gitmodules file and
> a bunch of gitlinks.  We only use it to track the advancement of
> submodule activity.

Which is fine. Did you think about having a branch where only the submodules are updated (and built and tested) and committed to by a buildbot when everything is fine? You could then merge that branch whenever you want up-to-date submodules and have the reproducibility of the exact model while being able to "float" along the updates of that branch?

I think it always boils down to this: Either commit new gitlinks, so the submodules get updated in a reproducible manner, or don't use gitlinks at all so the submodules can float wherever they want.

> So yes, I want my superproject's gitlinks to update automatically.  I
> just don't know a smart way to make that happen.

Yup, that has been the endpoint of all discussions about that topic so far. And until someone comes up with a smart way to make that happen, I would rather not put something half-baked into git.

(But please tell us when you found a smart way to do that! ;-)
Previous: Phil HordNext: Andreas T.Auer
Message 14 of 18 in “Auto update submodules after merge and reset”
  1. Max KrasnyanskyNov 30, 2011
  2. Jens LehmannNov 30, 2011
  3. Max KrasnyanskyDec 6, 2011
  4. Jens LehmannDec 6, 2011
  5. Andreas T.AuerDec 7, 2011
  6. Jens LehmannDec 7, 2011
  7. andreas.t.auer_gtml_37453@ursus.ath.cxDec 8, 2011
  8. Phil HordDec 9, 2011
  9. Andreas T.AuerDec 10, 2011
  10. Phil HordDec 11, 2011
  11. Andreas T.AuerDec 11, 2011
  12. Jens LehmannDec 12, 2011
  13. Phil HordDec 12, 2011
  14. Jens LehmannDec 13, 2011
  15. Andreas T.AuerDec 13, 2011
  16. Jens LehmannDec 13, 2011
  17. Andreas T.AuerDec 13, 2011
  18. Marc BranchaudDec 14, 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.