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

Re: [RFC PATCH] clone: add clone.recursesubmodules config option

From
JMJeremy Morton <admin@game-point.net>
Date
Aug 2, 2017, 18:11 UTC
Message-ID
<598215C8.4000100@game-point.net>
In-Reply-To
<20140606052601.GB77405@book.hvoigt.net>

Did this ever get anywhere? If not why not? It would be very useful to me to be able to clone recursively by default, especially considering you can't use 'alias' to override the existing 'clone' command.

-- 
Best regards,
Jeremy Morton (Jez)

On 06/06/2014 06:26, Heiko Voigt wrote:
> On Thu, Jun 05, 2014 at 11:18:28AM -0700, Junio C Hamano wrote:
>> Jens Lehmann<Jens.Lehmann@web.de>  writes:
>>> We had two settings in mind,...
>>> So what if clone would just do an "git submodule init" for now when
>>> "submodule.autoinit" is set but "submodule.autoupdate" isn't [?]
>>> ... and a single "submodule.auto" setting would be what users really want?
>>
>> I do not offhand think of a sensible scenario where you want to init
>> a submodule once but do not want to update it when the superproject
>> changes.  Even if the user uses the mode to detach the submodule
>> HEAD, i.e. the branches in submodules do not matter and the whole
>> tree is described by the superproject's commit and gitlinks recorded
>> in it, the user would want the new objects necessary for the updated
>> superproject, which means a submodule that is init'ed (whether it is
>> via "git submodule init" or the submodule.autoinit variable) must be
>> updated.
>>
>> So I am not sure why a user wants to disable autoupdate in the first
>> place.  For the same reason, setting submodule.*.update to none
>> would not make much sense, either.  Perhaps I am missing something.
>>
>> Unless the user is very conservative and suspects that these
>> recursive behaviour we are going to bolt on to various commands
>> could be buggy and untrustworthy, in which case the user might want
>> to manually run "git submodule update", or even run "git fetch"
>> after going there while bypassing the whole "git submodule".  But I
>> do not think that is healthy in the longer run.
>
> I think autoupdate is mainly there for the transition phase. Since
> submodule can e.g. contain a lot of files a checkout would take much
> longer. Similar to when Jens implemented the recursive diff, many people
> were annoyed by the new files showing up and some with the impact on
> performance (thats why we have the --ignore-submodules option).
>
> In case of very big submodules and people already ignore their diff it
> might even be necessary that the update is only done manually. E.g. for
> a big media repository.
>
> Cheers Heiko
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Previous: Heiko VoigtNext: Stefan Beller
Message 11 of 21 in “Paper cut bug: Why isn't "git clone xxxx" recursive by default?”
  1. Mara KimJun 3, 2014
  2. Junio C HamanoJun 3, 2014
  3. Junio C HamanoJun 3, 2014
  4. Mara KimJun 3, 2014
  5. clone: add clone.recursesubmodules config optionChris Packham, Jun 4, 2014
  6. Junio C HamanoJun 4, 2014
  7. Jens LehmannJun 4, 2014
  8. Junio C HamanoJun 5, 2014
  9. W. Trevor KingJun 5, 2014
  10. Heiko VoigtJun 6, 2014
  11. Jeremy MortonAug 2, 2017
  12. Stefan BellerAug 2, 2017
  13. Heiko VoigtJun 4, 2014
  14. Chris PackhamJun 5, 2014
  15. Heiko VoigtJun 6, 2014
  16. Junio C HamanoJun 6, 2014
  17. Jens LehmannJun 9, 2014
  18. W. Trevor KingJun 9, 2014
  19. Jeremy MortonOct 3, 2016
  20. Stefan BellerOct 3, 2016
  21. Heiko VoigtOct 4, 2016

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.