Subject: Re: [PATCH 0/2] fix problems with recursive submodule fetching

From: Jens Lehmann <[email-masked]>
Date: Sun, 19 Sep 2010 18:40:32 +0200

Am 19.09.2010 05:54, schrieb Kevin Ballard:
> Here's the submodule layout:
> 
>  .--Root-.
> / / /|\ \ \  
> A B C D E F G
>     |
>     H
>    /|\
>   I J K
>    /|\
>   L M N
>    /|\
>   O P Q
> 
> I control the root, and I control most of the first-level of submodules. I would also not mind seeing updates to other submodules at that level, though that doesn't generally concern me. However, I don't control submodule H, and I have absolutely no desire whatsoever to see updates to I-Q unless needed by submodule H. In this layout, regularly running `git submodule update --init --recursive` works perfectly. Having `git fetch` fetch submodules I-Q on every invocation is a complete waste of my time.

Sounds like adding  the "fetch=no" option to the .gitmodules entry
for submodule H would help you. That would tell "git fetch" to not
recurse into H and deeper.

But as you seem to be fine with running "git submodule update --init
--recursive" when needed you might be even better off by setting the
upcoming global config option to control recursive fetching to false.

But IMHO it makes more sense to let checkout take care of submodules
too and get rid of the necessity to call "git submodule update" every
time a submodule needs to be updated ...