t: move "git add submodule" into test blocks
authorJeff King <peff@peff.net>
Wed, 14 Jun 2017 10:58:25 +0000 (06:58 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jun 2017 16:10:47 +0000 (09:10 -0700)
commit17f2f88c9c9e0015cba6d962dc6d9e2329ddf713
tree851b58e3a37492f23249c7fdc1b3e432c8085db4
parent532139940c98a98bce2001bb495d75dec3d88e4d
t: move "git add submodule" into test blocks

Some submodule tests do some setup outside of a test_expect
block. This is bad because we won't actually check the
outcome of those commands. But it's doubly so because "git
add submodule" now produces a warning to stderr, which is
not suppressed by the test scripts in non-verbose mode.

This patch does the minimal to fix the annoying warnings.
All three of these scripts could use more cleanup of related
setup.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4041-diff-submodule-option.sh
t/t4060-diff-submodule-option-diff-format.sh
t/t7401-submodule-summary.sh