From 1f8d711548c08e05766e067dc23e5be3b1b72657 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Fri, 17 Mar 2017 15:38:04 -0700 Subject: submodule--helper init: set submodule..active When initializing a submodule set the submodule..active config to true if the module hasn't already been configured to be active by some other means (e.g. a pathspec set in submodule.active). Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- t/t7400-submodule-basic.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 't') diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index 3af1c00ff..cf77a3a35 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -1256,4 +1256,15 @@ test_expect_success 'clone and subsequent updates correctly auto-initialize subm test_cmp expect2 actual ' +test_expect_success 'init properly sets the config' ' + test_when_finished "rm -rf multisuper_clone" && + git clone --recurse-submodules="." \ + --recurse-submodules=":(exclude)sub0" \ + multisuper multisuper_clone && + + git -C multisuper_clone submodule init -- sub0 sub1 && + git -C multisuper_clone config --get submodule.sub0.active && + test_must_fail git -C multisuper_clone config --get submodule.sub1.active +' + test_done -- cgit v1.2.1