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:10 UTC
Message-ID
<47F2C0E4.10506@vilain.net>
In-Reply-To
<32541b130803301600g5005876enf0fbcfe03e660fc8@mail.gmail.com>
Avery Pennarun wrote:
>>  Well, that would create a lot of unnecessary work when cloning.
>>  Partitioning by project is a natural way to divide the projects up.
> 
> What unnecessary work do you mean?
A full clone takes a few shortcuts, especially over dumb transports like
HTTP.  I think there might be shortcuts in the git-daemon code as well.
 Forcing these to be partial might make these full fetches involve more
time.
Show 8 quoted lines
>>  However, what you are suggesting should IMHO be allowed to work.  In
>>  particular, if the submodule path is ".", then I think there's a good
>>  case that they should come from within the same project.  If it's a
>>  relative URL, it should initialize based on the remote URL that was used
>>  for the original fetch (or, rather, the remote URL for the current branch).
> I agree, there's no reason to take away the existing functionality of
> allowing split repos.  I was more suggesting a new functionality so
> that splitting isn't *required*.
Yes - I look forward to a patch.
Show 7 quoted lines
>>  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?
> One option is to make a simple "git push origin" operation fail if
> you're not on any branch; iirc, if you try that now, it just silently
> *succeeds* without uploading anything at all, which is one reason I so
> frequently screw it up.
Sounds workable.
> Alternatively, is there a reason I can't
> upload an object *without* giving it a branch name?  I guess that
> would cause problems with garbage collection.
You've answered your own question there.
Show 6 quoted lines
>>  There is also a Google Summer of Code project for this - see
>>  http://git.or.cz/gitwiki/SoC2008Ideas#head-9215572f23513542a23d3555aa72775bc4b91038
> 
> ok.  I was hoping it wouldn't be so hard as to require an entire SoC
> project, since using --alternate when checking out the child repo
> shouldn't be too hard.

If you think it is simpler, then I'm sure that submodules users would appreciate you sharing your ideas as a patch. Sorry if I am starting to sound like a parrot ;-).

Sam.
Previous: Avery PennarunNext: Johannes Sixt
Message 18 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.