From: Stefan Beller Date: Fri, 26 Feb 2016 20:51:51 GMT Subject: [PATCH 1/2] Check recursive submodule update to have correct path from subdirectory Message-ID: <1456519912-10641-2-git-send-email-sbeller@google.com> In-Reply-To: <1456519912-10641-1-git-send-email-sbeller@google.com> A similar test exists for `submodule sync` to behave well when being in an unrelated subdirectory and performing operations on submodules. Signed-off-by: Stefan Beller --- t/t7406-submodule-update.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh index 68ea31d..628da7f 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -774,4 +774,16 @@ test_expect_success 'submodule update --recursive drops module name before recur test_i18ngrep "Submodule path .deeper/submodule/subsubmodule.: checked out" actual ) ' + +test_expect_success 'submodule update --recursive works from subdirectory' ' + (cd super2 && + (cd deeper/submodule/subsubmodule && + git checkout HEAD^ + ) && + mkdir untracked && + cd untracked && + git submodule update --recursive >actual && + test_i18ngrep "Submodule path .../deeper/submodule/subsubmodule.: checked out" actual + ) +' test_done -- 2.7.2.368.g934fe14