From: Lars Schneider Date: Tue, 22 Aug 2017 14:50:06 GMT Subject: Re: [PATCH] pull: respect submodule update configuration Message-ID: In-Reply-To: <20170821182110.GA156514@google.com> > On 21 Aug 2017, at 20:21, Brandon Williams wrote: > > On 08/21, Stefan Beller wrote: >> On Mon, Aug 21, 2017 at 10:20 AM, Lars Schneider >> wrote: >>> >>>> On 21 Aug 2017, at 18:55, Stefan Beller wrote: >>>> >>>> On Mon, Aug 21, 2017 at 9:20 AM, Heiko Voigt wrote: >>>> >>>>>> So I am a bit curious to learn which part of this change you dislike >>>>>> and why. >>>>> >>>>> I am also curious. Isn't this the same strategy we are using in other >>>>> places? >>>>> >>>> >>>> I dislike it because the UX feels crude. When reading the documentation, >>>> it seems to me as if submodule. can be one of the following >>>> >>>> (none, checkout, rebase, merge, !) >>>> >>>> This is perfect for "submodule-update", whose primary goal is >>>> to update submodules *somehow*. However other commands >>>> >>>> git rebase --recurse >>>> git merge --recurse >>>> git checkout --recurse >>>> >>>> have a different primary mode of operation (note how their name >>>> is one of the modes from the set above), so it may get confusing >>>> for a user. >>>> >>>> 'none' and '!' seem like they would be okay >>>> for any of the commands above but then: >>>> >>>> git config submodule..update "!..." >>>> git reset --hard --recurse >>>> git status >>>> # submodule is reported, because "!..." did not 'reset'. >>>> >>>> Anyway. That dislike is just a minor gut feeling about the UX/UI >>>> being horrible. I wrote the patch to keep the conversation going, >>>> and if it fixes Lars problem, let's take it for now. >>> >>> Well, I need just a way to disable certain Submodules completely. >>> If you show me how "git config --local submodule.sub.active false" >>> works then I don't need this patch. > > Yeah if you want to completely disable a submodule (as in not even check > it out) then setting .active to false would do that. But as stefan > pointed out and IIRC 'submodule update --init' with no pathspec sets all > submodules to be active. Perhaps it should only init submodules who > don't already have an explicit active flag set. OK. I change my scripts to use ".active" and it seems to work nicely. I noticed one oddity, though: If I clone a repo using `git clone --recursive ` then the local Git config of the repo gets the following entry: [submodule] active = . Is this intentional? Something in the git/git test harness seems to prevent that. I was not able to write a test to replicate the issue. Any idea? Thanks, Lars