From: Phil Hord <hordp@cisco.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: phil.hord@gmail.com, Jens Lehmann <Jens.Lehmann@web.de>,
Jeff King <peff@peff.net>, Phil Hord <hordp@cisco.com>
Subject: [PATCH] t7407: Fix recursive submodule test
Date: Fri, 26 Oct 2012 15:13:54 -0400 [thread overview]
Message-ID: <1351278834-28867-1-git-send-email-hordp@cisco.com> (raw)
In-Reply-To: <CABURp0op2+QUvusUmAFUxT8s8c02bB9V3=ag9gTTSiiN4t96OA@mail.gmail.com>
A test in t7404-submodule-foreach purports to test that
the --cached flag is properly noticed by --recursive calls
to the foreach command as it descends into nested
submodules. However, the test really does not perform this
test since the change it looks for is in a top-level
submodule handled by the first invocation of the command.
To properly test for the flag being passed to recursive
invocations, the change must be buried deeper in the
hierarchy.
Move the change one level deeper so it properly verifies
the recursive machinery of the 'git submodule status'
command.
Signed-off-by: Phil Hord <hordp@cisco.com>
---
t/t7407-submodule-foreach.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh
index 9b69fe2..107b4b7 100755
--- a/t/t7407-submodule-foreach.sh
+++ b/t/t7407-submodule-foreach.sh
@@ -226,14 +226,14 @@ test_expect_success 'test "status --recursive"' '
test_cmp expect actual
'
-sed -e "/nested1 /s/.*/+$nested1sha1 nested1 (file2~1)/;/sub[1-3]/d" < expect > expect2
+sed -e "/nested2 /s/.*/+$nested2sha1 nested1\/nested2 (file2~1)/;/sub[1-3]/d" < expect > expect2
mv -f expect2 expect
test_expect_success 'ensure "status --cached --recursive" preserves the --cached flag' '
(
cd clone3 &&
(
- cd nested1 &&
+ cd nested1/nested2 &&
test_commit file2
) &&
git submodule status --cached --recursive -- nested1 > ../actual
--
1.8.0.2.gd008466.dirty
next prev parent reply other threads:[~2012-10-26 19:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-25 22:20 [PATCH] submodule status: properly pass options with --recursive Jens Lehmann
2012-10-26 13:15 ` Jeff King
2012-10-26 19:07 ` Phil Hord
2012-10-26 19:13 ` Phil Hord [this message]
2012-10-26 19:29 ` [PATCH] t7407: Fix recursive submodule test Jens Lehmann
2012-10-28 21:37 ` [PATCH] submodule status: remove unused orig_* variables Jens Lehmann
2012-10-29 7:27 ` Jeff King
2012-10-26 19:26 ` [PATCH] submodule status: properly pass options with --recursive Jens Lehmann
2012-10-26 19:44 ` [PATCHv3 0/2] Teach --recursive to submodule sync Phil Hord
2012-10-26 19:44 ` [PATCHv3 1/2] " Phil Hord
2012-10-26 19:44 ` [PATCHv3 2/2] Add tests for submodule sync --recursive Phil Hord
2012-10-28 21:02 ` [PATCHv3 0/2] Teach --recursive to submodule sync Jens Lehmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351278834-28867-1-git-send-email-hordp@cisco.com \
--to=hordp@cisco.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=phil.hord@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).