Introduce 'submodule.recurse' option for worktree manipulators
Any command that understands '--recurse-submodules' can have its default changed to true, by setting the new 'submodule.recurse' option. This patch includes read-tree/checkout/reset for working tree manipulating commands. Later patches will cover other commands. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
1d789d0892
commit
046b48239e
@ -990,6 +990,18 @@ test_submodule_switch_recursing_with_args () {
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success "git -c submodule.recurse=true $cmd_args: modified submodule updates submodule work tree" '
|
||||
prolog &&
|
||||
reset_work_tree_to_interested add_sub1 &&
|
||||
(
|
||||
cd submodule_update &&
|
||||
git branch -t modify_sub1 origin/modify_sub1 &&
|
||||
git -c submodule.recurse=true $cmd_args modify_sub1 &&
|
||||
test_superproject_content origin/modify_sub1 &&
|
||||
test_submodule_content sub1 origin/modify_sub1
|
||||
)
|
||||
'
|
||||
|
||||
# Updating a submodule to an invalid sha1 doesn't update the
|
||||
# superproject nor the submodule's work tree.
|
||||
test_expect_success "$command: updating to a missing submodule commit fails" '
|
||||
|
Reference in New Issue
Block a user