diff options
author | Mahi Kolla <mkolla2@illinois.edu> | 2021-08-14 03:09:56 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-30 23:23:17 +0200 |
commit | 48072e3d68049a6bbb4f99f3a381e8b7f3647c52 (patch) | |
tree | 0bfd64a070366ff64e68875929335c95489e6b4d /t/t5606-clone-options.sh | |
parent | Git 2.33-rc2 (diff) | |
download | git-48072e3d68049a6bbb4f99f3a381e8b7f3647c52.tar.xz git-48072e3d68049a6bbb4f99f3a381e8b7f3647c52.zip |
clone: set submodule.recurse=true if submodule.stickyRecursiveClone enabled
Based on current experience, when running git clone --recurse-submodules,
developers do not expect other commands such as pull or checkout to run
recursively into active submodules. However, setting submodule.recurse=true
at this step could make for a simpler workflow by eliminating the need for
the --recurse-submodules option in subsequent commands. To collect more
data on developers' preference in regards to making submodule.recurse=true
a default config value in the future, deploy this feature under the opt in
submodule.stickyRecursiveClone flag.
Signed-off-by: Mahi Kolla <mkolla2@illinois.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5606-clone-options.sh')
-rwxr-xr-x | t/t5606-clone-options.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh index 3a595c0f82..d822153e4d 100755 --- a/t/t5606-clone-options.sh +++ b/t/t5606-clone-options.sh @@ -16,6 +16,18 @@ test_expect_success 'setup' ' ' +test_expect_success 'submodule.stickyRecursiveClone flag manipulates submodule.recurse value' ' + + test_config_global submodule.stickyRecursiveClone true && + git clone --recurse-submodules parent clone_recurse_true && + test_cmp_config -C clone_recurse_true true submodule.recurse && + + test_config_global submodule.stickyRecursiveClone false && + git clone --recurse-submodules parent clone_recurse_false && + test_expect_code 1 git -C clone_recurse_false config --get submodule.recurse + +' + test_expect_success 'clone -o' ' git clone -o foo parent clone-o && |