From: Taylor Blau Date: Fri, 7 Oct 2022 00:00:04 +0000 (-0400) Subject: Sync with 2.37.4 X-Git-Tag: v2.38.1~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f64d4ca8d65bdca39da444d24bde94864ac01bb1;p=thirdparty%2Fgit.git Sync with 2.37.4 Signed-off-by: Taylor Blau --- f64d4ca8d65bdca39da444d24bde94864ac01bb1 diff --cc t/t7400-submodule-basic.sh index b50db3f103,7fa8520f4c..a989aafaf5 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@@ -14,32 -14,10 +14,36 @@@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_ . ./test-lib.sh + test_expect_success 'setup - enable local submodules' ' + git config --global protocol.file.allow always + ' + +test_expect_success 'submodule usage: -h' ' + git submodule -h >out 2>err && + grep "^usage: git submodule" out && + test_must_be_empty err +' + +test_expect_success 'submodule usage: --recursive' ' + test_expect_code 1 git submodule --recursive >out 2>err && + grep "^usage: git submodule" err && + test_must_be_empty out +' + +test_expect_success 'submodule usage: status --' ' + test_expect_code 1 git submodule -- && + test_expect_code 1 git submodule --end-of-options +' + +for opt in '--quiet' '--cached' +do + test_expect_success "submodule usage: status $opt" ' + git submodule $opt && + git submodule status $opt && + git submodule $opt status + ' +done + test_expect_success 'submodule deinit works on empty repository' ' git submodule deinit --all '