summaryrefslogtreecommitdiff
path: root/t/t7407-submodule-foreach.sh
diff options
context:
space:
mode:
authorPhil Hord <hordp@cisco.com>2012-10-26 19:13:54 (GMT)
committerJeff King <peff@peff.net>2012-10-29 07:24:57 (GMT)
commit58ca9ad4d68951f5f04f7c2399be55590dcf6a59 (patch)
tree78bd55c5f757e20e48bf8518039af8f74c62c99c /t/t7407-submodule-foreach.sh
parent7e2010537e96d0a1144520222f20ba1dc3d61441 (diff)
downloadgit-58ca9ad4d68951f5f04f7c2399be55590dcf6a59.zip
git-58ca9ad4d68951f5f04f7c2399be55590dcf6a59.tar.gz
git-58ca9ad4d68951f5f04f7c2399be55590dcf6a59.tar.bz2
t7407: Fix recursive submodule test
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> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 't/t7407-submodule-foreach.sh')
-rwxr-xr-xt/t7407-submodule-foreach.sh4
1 files 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