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

Re: Composing git repositories

From
Jens Lehmann <jens.lehmann@web.de>
Date
Mar 28, 2013, 20:40 UTC
Message-ID
<5154AACC.7050006@web.de>
In-Reply-To
<CALkWK0nfNCu775MBB-Y28=V93RkV24kbTLTDKWO2dZ-0yxX=Sw@mail.gmail.com>
Am 28.03.2013 10:16, schrieb Ramkumar Ramachandra:
Show 15 quoted lines
> Jens Lehmann wrote:
>> Unless you acknowledge that submodules are a different repo, you'll
>> always run into problems. I believe future enhancements will make
>> this less tedious, but in the end they will stay separate repos
>> (which is the whole point, you'd want to use a different approach
>> - e.g. subtree - if you want to put stuff from different upstreams
>> into a single repo without keeping the distinction where all that
>> came from).
> 
> I acknowledge that it's a different repository.  It's just that I
> think that our current design has too many seams: why do you think
> it's impossible to make it seamless?
> 
> git-subtree is not an answer to anything.  Dumping all the history
> into one repository has its limited usecases, but it is no solution.

Guess what: submodules are the solution for a certain set of use cases, and tools like subtree are a solution for another set of use cases. There is no silver bullet.

Show 9 quoted lines
>> What else than a commit object should that be??? Submodules are
>> there to have a different upstream for a part of your work tree,
>> and that means a commit in that repo is the only sane thing to
>> record in the superproject. A lot of thought has been put into
>> this, and it is definitely a good choice [1].
> 
> Linus argues that it shouldn't be a tree object, and I agree with
> that.  I don't see an argument that says that the commit object is a
> perfect fit (probably because it's not).

There was discussion about what to record in the index/commit of the superproject in early submodule days (some time before I became involved in Git, seems I currently cannot find a link to that). A commit is the thing to record here because it *is* the perfect fit, as some years of submodule experience show.

Show 10 quoted lines
>> How? The "submodules suck, we should try a completely different
>> approach" thingy comes up from time to time, but so far nobody
>> could provide a viable alternative to what we currently do.
> 
> My argument is not "submodules suck; we should throw them out of the
> window, and start from scratch" at all.  I'm merely questioning the
> fundamental assumptions that submodules make, instead of proposing
> that we work around everything in shell.  We don't have to be married
> to the existing implementation of submodules and try to fix all the
> problems in shell.

You cannot simply change the fundamental assumptions of submodules and expect them to be the same thing afterwards. And it doesn't matter at all if we "fix all the problems in shell" or in C-code, we'll fix the remaining problems that are fixable in whatever part of Git it makes sense. And I don't have the impression you have an idea about what submodules are good at, where they can be improved and what problems they'll probably never solve.

Show 8 quoted lines
>> And apart from that, let's not forget we identified some valuable
>> improvements to submodules in this thread:
>> [...]
>> All of those are topics I like to see materialize, and you are
>> welcome to tackle them.
> 
> Allow me a few days to think about changing the fundamental building
> blocks to make our shell hackery easier.

Please go ahead, but if your goal is "to make our shell hackery easier" I'm not interested. I want to improve the user experience of submodules and don't care much in what language we achieve that. And I can't see anything fundamental being wrong with submodules but strongly believe they are a perfect match for some very important use cases (some of which I see happening at my $dayjob for some years now), so I still don't see what you are trying to "fix" here.

Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 17 of 43 in “Composing git repositories”
  1. Ramkumar RamachandraMar 26, 2013
  2. Junio C HamanoMar 26, 2013
  3. Ramkumar RamachandraMar 27, 2013
  4. Junio C HamanoMar 27, 2013
  5. Ramkumar RamachandraMar 27, 2013
  6. Junio C HamanoMar 27, 2013
  7. Jonathan NiederMar 27, 2013
  8. Junio C HamanoMar 27, 2013
  9. Jonathan NiederMar 27, 2013
  10. Ramkumar RamachandraMar 28, 2013
  11. Jens LehmannMar 28, 2013
  12. Ramkumar RamachandraMar 28, 2013
  13. Jonathan NiederMar 28, 2013
  14. Jens LehmannMar 28, 2013
  15. Jens LehmannMar 27, 2013
  16. Ramkumar RamachandraMar 28, 2013
  17. Jens LehmannMar 28, 2013
  18. Ramkumar RamachandraMar 31, 2013
  19. Jonathan NiederMar 31, 2013
  20. Ramkumar RamachandraApr 2, 2013
  21. Jeff KingApr 2, 2013
  22. Ramkumar RamachandraApr 2, 2013
  23. Jens LehmannApr 2, 2013
  24. Junio C HamanoApr 2, 2013
  25. Junio C HamanoApr 4, 2013
  26. Duy NguyenApr 5, 2013
  27. Junio C HamanoApr 5, 2013
  28. Duy NguyenApr 5, 2013
  29. Jens LehmannApr 5, 2013
  30. Phil HordMar 31, 2013
  31. Jens LehmannApr 1, 2013
  32. Phil HordApr 1, 2013
  33. Ramkumar RamachandraApr 2, 2013
  34. Jonathan NiederApr 2, 2013
  35. Junio C HamanoApr 2, 2013
  36. Ramkumar RamachandraApr 2, 2013
  37. Jonathan NiederApr 2, 2013
  38. Ramkumar RamachandraApr 2, 2013
  39. Ramkumar RamachandraApr 2, 2013
  40. Jens LehmannApr 2, 2013
  41. Jens LehmannApr 1, 2013
  42. Seth RobertsonApr 1, 2013
  43. Ramkumar RamachandraApr 2, 2013

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.