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

Re: git-submodule getting submodules from the parent repository

From
Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no>
Date
Mar 30, 2008, 13:32 UTC
Message-ID
<D0F821FA-AF53-4F1F-B9CC-58346828FA15@orakel.ntnu.no>
In-Reply-To
<47EECF1F.60908@vilain.net>
On 30. mars. 2008, at 00.22, Sam Vilain <sam@vilain.net> wrote:
Show 12 quoted lines
> Avery Pennarun wrote:
>
>> 2. You still check into C, then B, then A, but it doesn't actually
>> matter if you put B and C on a branch first or not, because 'git  
>> push'
>> will work properly, because it auto-pushes B and C revisions based on
>> the fact that A refers to them (ie. implicit branches via the
>> submodule mechanism).
>
> This push failure thing is regrettable; however it's not clear which
> branch name the submodules should get.  A given commit might exist on
> several branches, which one do you choose to name it?

I solved that by adding a "submodule push" that pushes the detached head of each submodule to its own ref ("refs/submodule-update/commit- $sha1", imaginatively). I also made "submodule update" try to fetch that ref when looking for a sha1.

I ran into trouble trying to avoid pushing every submodule for each "submodule push", and then more or less decided not to use submodules, so it's not quite fit for public consumption. I still think it's a sound idea in principle, so I'll clean it up and send it to the list if there's any interest.

-- 
Eyvind Bernhardsen
Previous: Sam VilainNext: Sam Vilain
Message 3 of 20 in “git-submodule getting submodules from the parent repository”
  1. Avery PennarunMar 29, 2008
  2. Sam VilainMar 29, 2008
  3. Eyvind BernhardsenMar 30, 2008
  4. Sam VilainMar 30, 2008
  5. Eyvind BernhardsenMar 30, 2008
  6. Sam VilainMar 30, 2008
  7. Eyvind BernhardsenMar 31, 2008
  8. Avery PennarunMar 30, 2008
  9. Eyvind BernhardsenMar 31, 2008
  10. Avery PennarunMar 31, 2008
  11. Sam VilainApr 1, 2008
  12. Avery PennarunApr 1, 2008
  13. Junio C HamanoApr 2, 2008
  14. Avery PennarunApr 2, 2008
  15. Sam VilainApr 2, 2008
  16. Junio C HamanoApr 2, 2008
  17. Avery PennarunMar 30, 2008
  18. Sam VilainApr 1, 2008
  19. Johannes SixtMar 31, 2008
  20. Avery PennarunMar 31, 2008

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.