On Mon, Oct 3, 2016 at 8:36 AM, Jeremy Morton <admin@xxxxxxxxxxxxxx> wrote: > Did this ever get anywhere? Can we recursively update submodules with "git > pull" in the supermodule now? I think the idea is sound. >> diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh >> index 7ca10b8..fc2c189 100755 >> --- a/t/t7407-submodule-foreach.sh >> +++ b/t/t7407-submodule-foreach.sh Not sure if t7407-submodule-foreach.sh is the best place to put these tests, as it is not `submodule foreach`, maybe put it into 7400 (though that is larger already) >> +test_expect_success 'use "git clone" with clone.recursesubmodules to >> checkout all submodules' ' >> + git config --local clone.recursesubmodules true&& Nit of the day: I think we prefer a single white space between the line and the ending &&. No need for --local as that is the default. However I'd propose to use test_config here, as then the option is cleaned up after the test automatically. >> + git clone super clone7&& >> + ( >> + cd clone7&& >> + git rev-parse --resolve-git-dir .git&& >> + git rev-parse --resolve-git-dir sub1/.git&& >> + git rev-parse --resolve-git-dir sub2/.git&& >> + git rev-parse --resolve-git-dir sub3/.git&& >> + git rev-parse --resolve-git-dir nested1/.git&& >> + git rev-parse --resolve-git-dir nested1/nested2/.git&& >> + git rev-parse --resolve-git-dir >> nested1/nested2/nested3/.git&& >> + git rev-parse --resolve-git-dir >> nested1/nested2/nested3/submodule/.git >> + )&& >> + git config --local --unset clone.recursesubmodules No need to unset it here when test_config is used. We'd maybe would want to also test that git -c clone.recursesubmodules clone --no-recursive ... works as expected (the --no-recursive taking precedence over the config option)