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

Re: git-submodule getting submodules from the parent repository

From
Sam Vilain <sam@vilain.net>
Date
Apr 1, 2008, 23:05 UTC
Message-ID
<47F2BFCD.5070202@vilain.net>
In-Reply-To
<32541b130803311436t7b5041a4pabface15aad8ce63@mail.gmail.com>
Avery Pennarun wrote:
> I even *use* git-submodule and had to modify my build scripts because
> "git submodule init" and "git submodule update" don't seem to kick in
> automatically for some reason.

The reason is that not everyone wants that by default. Perhaps it is a good idea for it to be default behaviour; but all in good time. It can be a user-selected option to clone first.

> The ideal situation would be to have
> git just manage the version control without having to babysit it, of
> course.

I can understand the motivation to write such disparaging remarks; however it may be more productive to come up with good ideas about how it can be made to work better for you, without getting in the way of other users. patches are even better!

Show 6 quoted lines
>>  If I understand you correctly, you want to be forced to create a
>>  branch and push to that?  I don't think that works well with many
>>  developers pushing to a shared repository (my situation),
> 
> Hmm, this is curious.  If you're *not* using submodules, then I don't
> think you can push successfully without being on a branch, can you?
Sure, you could;
  git push origin HEAD:branchname

However I think the right solution to this is to name the branch appropriately somehow, so that the default push operation works.

> If you 'git checkout -b branchname' inside a submodule, then 'git
> push' will do the right thing, so I'm not sure what you'd want to be
> more automagical than that.

Well, where did you get the branch name from? That's the part that requires user intervention. You could make an educated guess, such as with git name-rev, but it would not necessarily be the right guess - so user confirmation of the choice would be desirable.

Sam.
Previous: Avery PennarunNext: Avery Pennarun
Message 11 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.