]> git.ipfire.org Git - thirdparty/git.git/commit - t/t2013-checkout-submodule.sh
submodule test invocation: only pass additional arguments
authorStefan Beller <sbeller@google.com>
Fri, 26 May 2017 19:10:11 +0000 (12:10 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 May 2017 05:28:53 +0000 (14:28 +0900)
commit17f38cb704623561fb4efd143429d63149f585d8
tree2473607ea1eb6e761e26bc7163b54fade551dd33
parent58b75bd6db45a5108af41b764d617d677f26a6ca
submodule test invocation: only pass additional arguments

In a later patch we want to introduce a config option to trigger the
submodule recursing by default. As this option should be available and
uniform across all commands that deal with submodules we'd want to test
for this option in the submodule update library.

So instead of calling the whole test set again for
"git -c submodule.recurse foo" instead of "git foo --recurse-submodules",
we'd only want to introduce one basic test that tests if the option is
recognized and respected to not overload the test suite.

Change the test functions by taking only the argument and assemble the
command inside the test function by embedding the arguments into the
command that is "git $arguments --recurse-submodules".

It would be nice to do this for all functions in lib-submodule-update,
but we cannot do that for the non-recursing tests, as there we do not
just pass in a git command but whole functions. (See t3426 for example)

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-submodule-update.sh
t/t1013-read-tree-submodule.sh
t/t2013-checkout-submodule.sh
t/t7112-reset-submodule.sh