diff options
author | Stefan Beller <sbeller@google.com> | 2017-05-31 17:30:47 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-01 10:36:36 +0900 |
commit | 046b48239eca34425909330e59da57f5fd421bdc (patch) | |
tree | 0b9e24fe8237837f2a3934ea36d9376df4616d10 /t/lib-submodule-update.sh | |
parent | 1d789d089280539ca39b83aabb67860929d39b75 (diff) | |
download | git-046b48239eca34425909330e59da57f5fd421bdc.tar.gz |
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>
Diffstat (limited to 't/lib-submodule-update.sh')
-rwxr-xr-x | t/lib-submodule-update.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh index 0272c4d8ca..52beadad96 100755 --- a/t/lib-submodule-update.sh +++ b/t/lib-submodule-update.sh @@ -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" ' |