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

Re: Composing git repositories

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 27, 2013, 20:18 UTC
Message-ID
<7vppyklhot.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130327192630.GF28148@google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 22 quoted lines
> Ramkumar Ramachandra wrote:
>
>>                        Even then, working with one worktree embedded
>> inside another is something git never designed for: it explains why I
>> have to literally fight with git when using submodules
>
> Do you mean that you wish you could ignore subrepository boundaries
> and use commands like
>
> 	git clone --recurse-submodules http://git.zx2c4.com/cgit
> 	cd cgit
> 	vi git/cache.h
> 	... edit edit edit ...
> 	git add --recurse-submodules git/cache.h
> 	git commit --recurse-submodules
> 	git push --recurse-submodules
>
> , possibly with configuration to allow the --recurse-submodules to be
> implied, and have everything work out well?
> ...
> I think something like that is a goal for submodules in the long
> term,...

As you hinted with "complications" below, I have to wonder what should happen when the above "git add" touches anything outside "git" subdirectory.

But such an administrative details (the project boundary is primarily not an implementation detail but is a social issue) aside, I agree that overall it would be a good user experience.

I however do not see the implementation detail of having (or not having) separate $GIT_DIR for component projects having anything to do with the goal of that ideal.

Where and how do you envision the metainformation about the component projects are stored in such a clone? It does not have to be cgit/.git, but you would need to somehow store things we store in $GIT_DIR for cgit itself and git in the current system. If you pick one location to store both, I would imagine that it would still be somewhere under the cgit directory.

As I said in another thread, your top-level may be only a part in somebody else's project, and what you consider just a part of your project may be the whole project to somebody else. If you pick one location to store both for the above clone, e.g. cgit/.git (it could be cgit/.ram-git or any other name), embedding it in a yet larger project (perhaps having both cgit and gitolite to give a one-stop solution for hosting services) later would face the same issue as Ram seemed to be complaining. It needs to address what happens when that cgit/.git (or whatever name) gets in the way in the scope of the larger project. That is why I said Ram's rant, using subjective words like "elegant", without sound technical justification, did not make much sense to me.

Previous: Jonathan NiederNext: Jonathan Nieder
Message 8 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.