summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d69ecf6)
raw | patch | inline | side by side (parent: d69ecf6)
author | Johan Herland <johan@herland.net> | |
Wed, 19 Aug 2009 01:45:21 +0000 (03:45 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 19 Aug 2009 05:51:31 +0000 (22:51 -0700) |
Add verification of the behaviour of '$name' to the git submodule
foreach selftest.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
foreach selftest.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7407-submodule-foreach.sh | patch | blob | history |
index 76e0734cea80f1ec8224d8bff695991518eea010..991aa80c8a7a23be0be61d515a74bc16d7b7b38b 100755 (executable)
cat > expect <<EOF
Entering 'sub1'
-sub1-$sub1sha1
+foo1-sub1-$sub1sha1
Entering 'sub3'
-sub3-$sub3sha1
+foo3-sub3-$sub3sha1
EOF
test_expect_success 'test basic "submodule foreach" usage' '
(
cd clone &&
git submodule update --init -- sub1 sub3 &&
- git submodule foreach "echo \$path-\$sha1" > ../actual
+ git submodule foreach "echo \$name-\$path-\$sha1" > ../actual
) &&
test_cmp expect actual
'