> On 16 Aug 2017, at 20:51, Stefan Beller <sbeller@xxxxxxxxxx> wrote: > > On Wed, Aug 16, 2017 at 11:35 AM, Lars Schneider > <larsxschneider@xxxxxxxxx> wrote: >> Hi, >> >> I think we discovered a regression in Git 2.14.1 today. >> It looks like as if "git submodule update --init --recursive" removes >> the "skip submodules" config. >> >> Consider the following steps: >> >> git clone https://server/repo.git >> cd repo >> git config --local submodule.some/other/repo.update none >> git submodule update --init --recursive >> git pull --recurse-submodules >> >> With Git 2.14 the last "git pull" will clone the "some/other/repo" >> submodule. This did not happen with Git 2.13. >> >> Bug or feature? I don't have anymore time for Git today. I am happy to >> provide a proper test case tomorrow, though. > > $ git log --oneline v2.13.0..v2.14.1 -- git-submodule.sh > 532139940c add: warn when adding an embedded repository > (I am confident this is not the suspect, let's keep searching. > Not a lot happened in submodule land apparently) > > Looking through all commits v2.13..v2.14 doesn't have me > suspect any of them. > > Any chance the "did not happen with 2.13" was not > freshly cloned but tested on an existing repo? If so a hot > candidate for suspicion is a93dcb0a56 (Merge branch > 'bw/submodule-is-active', 2017-03-30), IMHO, just > gut feeling, though. > > Oh, wait. > $ git log --oneline v2.13.0..v2.14.1 -- builtin/pull.c > c9c63ee558 Merge branch 'sb/pull-rebase-submodule' > a6d7eb2c7a pull: optionally rebase submodules (remote submodule changes only) > could also be a culprit. Do you have pull.rebase set? I bisected the problem today and "a6d7eb2c7a pull: optionally rebase submodules (remote submodule changes only)" is indeed the culprit. The commit seems to break the following test case. diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index dcac364c5f..24f9729015 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -1289,4 +1289,19 @@ test_expect_success 'init properly sets the config' ' test_must_fail git -C multisuper_clone config --get submodule.sub1.active ' +test_expect_success 'submodule update and git pull with disabled submodule' ' + test_when_finished "rm -rf multisuper_clone" && + pwd=$(pwd) && + git clone file://"$pwd"/multisuper multisuper_clone && + ( + cd multisuper_clone && + git config --local submodule.sub0.update none && + git submodule update --init --recursive && + git pull --recurse-submodules && + git submodule status | cut -c 1,43- >actual + ) && + ls && + test_cmp expect multisuper_clone/actual +' + test_done I am not familiar with the code. Does anyone see the problem right away? Thanks, Lars