diff options
author | Jens Lehmann <Jens.Lehmann@web.de> | 2013-11-11 21:55:52 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-11-11 14:10:57 -0800 |
commit | 361412828ab580e145c3350cf075b283ebe331a5 (patch) | |
tree | 6e251b6233dce9beb305144b46efb1a193eb8380 /t/t7406-submodule-update.sh | |
parent | Sync with 1.8.4.3 (diff) | |
download | tgif-361412828ab580e145c3350cf075b283ebe331a5.tar.xz |
submodule update: remove unnecessary orig_flags variable
cmd_update() in the submodule script tries to preserve the options given
on the command line in the "orig_flags" variable to pass them on into the
recursion when the '--recursive' option is given. But this isn't necessary
because all the variables set by the options will be seen in the recursion
too as that is achieved by executing "eval cmd_update".
The same has already been done for cmd_status() in e15bec0ec, so let's
clean up cmd_update() likewise. Also add a test to make sure that a
submodule name given on the command line is not passed into the recursion
(which was the goal of adding the orig_flags variable in 98dbe63db).
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7406-submodule-update.sh')
-rwxr-xr-x | t/t7406-submodule-update.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh index f0b33053ab..2d9db8e8b7 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -747,6 +747,17 @@ test_expect_success 'submodule update clone shallow submodule' ' (cd submodule && test 1 = $(git log --oneline | wc -l) ) +) +' + +test_expect_success 'submodule update --recursive drops module name before recursing' ' + (cd super2 && + (cd deeper/submodule/subsubmodule && + git checkout HEAD^ + ) && + git submodule update --recursive deeper/submodule >actual && + test_i18ngrep "Submodule path .deeper/submodule/subsubmodule.: checked out" actual ) ' + test_done |