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

Re: [RFC PATCH 0/2] Teach rm to better handle submodules

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 5, 2012, 22:10 UTC
Message-ID
<7vliixrh8y.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4FF5E5A6.7000506@web.de>
Jens Lehmann <Jens.Lehmann@web.de> writes:
Show 8 quoted lines
> Am 05.07.2012 02:44, schrieb Junio C Hamano:
> ...
>> I wouldn't claim that I have thought things through yet, but in
>> general my instinct tells me that it is a bad idea to try pushing
>> down "submodule management" related bits to the core.
>
> Am I right assuming you are only talking about 2/2 here and not
> about the bugfix in 1/2?

I was addressing the general attitude, expressed in your [0/2] cover letter, of eagerly attempting to push down to the core side what could be affected by non-core policy, namely, things like what is in ".gitmodules" and how the working trees and controlling repositories of submodules are laid out (cf. the other thread on GIT_WORK_TREE and GIT_DIR used for the top-level superproject). The comment was not about either of the two patches.

When making a project-wide structural change to the superproject by adding a submodule, "git submodule add" is used to add optional information in .gitmodules, because where the other people would clone the history for the submodule (or if there is a place for other people to fetch it in the first place---a private standalone project does not even need one) is not something the core "git add" is not interested in. Ceasing to use a submodule project wide (the use case (1) in the message you are responding to) by removing the submodule tree and an entry in .gitmodule for it is the same kind of project wide structural change, and it felt very out of place, at least to me, to have "git rm" do anything with .gitmodules file.

Previous: Jens Lehmann
Message 19 of 19 in “Teach rm to better handle submodules”
  1. 0/2 Teach rm to better handle submodulesJens Lehmann, Jul 4, 2012
  2. 1/2 rm: don't fail when removing populated submodulesJens Lehmann, Jul 4, 2012
  3. Junio C HamanoJul 6, 2012
  4. Jens LehmannJul 7, 2012
  5. Junio C HamanoJul 8, 2012
  6. Jens LehmannJul 8, 2012
  7. Junio C HamanoJul 9, 2012
  8. Junio C HamanoJul 9, 2012
  9. Jens LehmannJul 9, 2012
  10. Junio C HamanoJul 9, 2012
  11. Jens LehmannJul 9, 2012
  12. Junio C HamanoAug 16, 2012
  13. Jens LehmannAug 17, 2012
  14. Phil HordAug 17, 2012
  15. Jens LehmannAug 19, 2012
  16. 2/2 rm: remove submodules from the index and the .gitmodules fileJens Lehmann, Jul 4, 2012
  17. Junio C HamanoJul 5, 2012
  18. Jens LehmannJul 5, 2012
  19. Junio C HamanoJul 5, 2012

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.