This patch adds two new test cases in t7406 to ensure that the --merge/--rebase options are ignored for "git submodule update" with new modules. These test that a simple checkout is performed instead. Signed-off-by: Spencer E. Olson <olsonse@xxxxxxxxx> --- t/t7406-submodule-update.sh | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh index bfb4975..141251c 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -203,4 +203,28 @@ test_expect_success 'submodule init picks up merge' ' ) ' +test_expect_success 'submodule update --merge - ignores --merge for new submodules' ' + (cd super && + rm -rf submodule && + git submodule update submodule && + git submodule status submodule >expect && + rm -rf submodule && + git submodule update --merge submodule && + git submodule status submodule >actual && + test_cmp expect actual + ) +' + +test_expect_success 'submodule update --rebase - ignores --rebase for new submodules' ' + (cd super && + rm -rf submodule && + git submodule update submodule && + git submodule status submodule >expect && + rm -rf submodule && + git submodule update --rebase submodule && + git submodule status submodule >actual && + test_cmp expect actual + ) +' + test_done -- 1.7.4.1.42.g43f9f -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html