@ -131,7 +131,7 @@ test_expect_success 'git-clean with out of work tree relative path' '
@@ -131,7 +131,7 @@ test_expect_success 'git-clean with out of work tree relative path' '
)
'
test_expect_success 'git-clean with out of work tree absolute path' '
test_expect_success 'git clean with out of work tree absolute path' '
@ -142,11 +142,11 @@ test_expect_success 'git-clean with out of work tree absolute path' '
@@ -142,11 +142,11 @@ test_expect_success 'git-clean with out of work tree absolute path' '
)
'
test_expect_success 'git-clean -d with prefix and path' '
test_expect_success 'git clean -d with prefix and path' '
test_expect_success 'status should fail for unmapped paths' '
if git-submodule status
if git submodule status
then
echo "[OOPS] submodule status succeeded"
false
@ -60,16 +60,16 @@ test_expect_success 'status should fail for unmapped paths' '
@@ -60,16 +60,16 @@ test_expect_success 'status should fail for unmapped paths' '
'
test_expect_success 'status should only print one line' '
lines=$(git-submodule status | wc -l) &&
lines=$(git submodule status | wc -l) &&
test $lines = 1
'
test_expect_success 'status should initially be "missing"' '
git-submodule status | grep "^-$rev1"
git submodule status | grep "^-$rev1"
'
test_expect_success 'init should register submodule url in .git/config' '
git-submodule init &&
git submodule init &&
url=$(git config submodule.example.url) &&
if test "$url" != "git://example.com/init.git"
then
@ -84,7 +84,7 @@ test_expect_success 'init should register submodule url in .git/config' '
@@ -84,7 +84,7 @@ test_expect_success 'init should register submodule url in .git/config' '
test_expect_success 'update should fail when path is used by a file' '
echo "hello" >init &&
if git-submodule update
if git submodule update
then
echo "[OOPS] update should have failed"
false
@ -100,7 +100,7 @@ test_expect_success 'update should fail when path is used by a file' '
@@ -100,7 +100,7 @@ test_expect_success 'update should fail when path is used by a file' '
test_expect_success 'update should fail when path is used by a nonempty directory' '
mkdir init &&
echo "hello" >init/a &&
if git-submodule update
if git submodule update
then
echo "[OOPS] update should have failed"
false
@ -116,7 +116,7 @@ test_expect_success 'update should fail when path is used by a nonempty director
@@ -116,7 +116,7 @@ test_expect_success 'update should fail when path is used by a nonempty director
test_expect_success 'update should work when path is an empty dir' '
rm -rf init &&
mkdir init &&
git-submodule update &&
git submodule update &&
head=$(cd init && git rev-parse HEAD) &&
if test -z "$head"
then
@ -130,14 +130,14 @@ test_expect_success 'update should work when path is an empty dir' '
@@ -130,14 +130,14 @@ test_expect_success 'update should work when path is an empty dir' '
'
test_expect_success 'status should be "up-to-date" after update' '
git-submodule status | grep "^ $rev1"
git submodule status | grep "^ $rev1"
'
test_expect_success 'status should be "modified" after submodule commit' '
cd init &&
echo b >b &&
git add b &&
git-commit -m "submodule commit 2" &&
git commit -m "submodule commit 2" &&
rev2=$(git rev-parse HEAD) &&
cd .. &&
if test -z "$rev2"
@ -145,19 +145,19 @@ test_expect_success 'status should be "modified" after submodule commit' '
@@ -145,19 +145,19 @@ test_expect_success 'status should be "modified" after submodule commit' '
echo "[OOPS] submodule git rev-parse returned nothing"
false
fi &&
git-submodule status | grep "^+$rev2"
git submodule status | grep "^+$rev2"
'
test_expect_success 'the --cached sha1 should be rev1' '
git-submodule --cached status | grep "^+$rev1"
git submodule --cached status | grep "^+$rev1"
'
test_expect_success 'git diff should report the SHA1 of the new submodule commit' '
git-diff | grep "^+Subproject commit $rev2"
git diff | grep "^+Subproject commit $rev2"
'
test_expect_success 'update should checkout rev1' '
git-submodule update init &&
git submodule update init &&
head=$(cd init && git rev-parse HEAD) &&
if test -z "$head"
then
@ -171,12 +171,12 @@ test_expect_success 'update should checkout rev1' '
@@ -171,12 +171,12 @@ test_expect_success 'update should checkout rev1' '
'
test_expect_success 'status should be "up-to-date" after update' '
git-submodule status | grep "^ $rev1"
git submodule status | grep "^ $rev1"
'
test_expect_success 'checkout superproject with subproject already present' '