From: Stefan Beller Date: Fri, 25 Mar 2016 18:39:14 GMT Subject: [PATCHv3 3/5] submodule update: add test for recursive from non root dir Message-ID: <1458931156-29125-4-git-send-email-sbeller@google.com> In-Reply-To: <1458931156-29125-1-git-send-email-sbeller@google.com> Test "submodule update --recursive" being invoked from a sub directory as this is currently not covered by the test suite. Signed-off-by: Stefan Beller --- t/t7406-submodule-update.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh index 68ea31d..19d8552 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -767,11 +767,19 @@ test_expect_success 'submodule update clone shallow submodule' ' test_expect_success 'submodule update --recursive drops module name before recursing' ' (cd super2 && - (cd deeper/submodule/subsubmodule && - git checkout HEAD^ - ) && + git -C deeper/submodule/subsubmodule checkout HEAD^ git submodule update --recursive deeper/submodule >actual && test_i18ngrep "Submodule path .deeper/submodule/subsubmodule.: checked out" actual ) ' + +test_expect_success 'submodule update --recursive works from subdirectory' ' + (cd super2 && + git -C deeper/submodule/subsubmodule checkout HEAD^ + mkdir untracked && + cd untracked && + git submodule update --recursive >actual && + test_i18ngrep "Submodule path .../deeper/submodule/subsubmodule.: checked out" actual + ) +' test_done -- 2.8.0.rc4.10.g52f3f33.dirty