t7000-t7999: fix broken &&-chains
[gitweb.git] / t / t7506-status-submodule.sh
index 9edf6572ed3b8f04ef1169f545043fcb2e09fe21..943708fb04a114bc020d33cbf21b4e4e62e805bd 100755 (executable)
@@ -18,7 +18,7 @@ test_create_repo_with_commit () {
 }
 
 sanitize_output () {
-       sed -e "s/$_x40/HASH/" -e "s/$_x40/HASH/" output >output2 &&
+       sed -e "s/$OID_REGEX/HASH/" -e "s/$OID_REGEX/HASH/" output >output2 &&
        mv output2 output
 }
 
@@ -193,9 +193,9 @@ test_expect_success 'status with added and untracked file in modified submodule
 
 test_expect_success 'setup .git file for sub' '
        (cd sub &&
-        rm -f new-file
+        rm -f new-file &&
         REAL="$(pwd)/../.real" &&
-        mv .git "$REAL"
+        mv .git "$REAL" &&
         echo "gitdir: $REAL" >.git) &&
         echo .real >>.gitignore &&
         git commit -m "added .real to .gitignore" .gitignore
@@ -209,12 +209,12 @@ test_expect_success 'status with added file in modified submodule with .git file
 
 test_expect_success 'status with a lot of untracked files in the submodule' '
        (
-               cd sub
+               cd sub &&
                i=0 &&
                while test $i -lt 1024
                do
-                       >some-file-$i
-                       i=$(( $i + 1 ))
+                       >some-file-$i &&
+                       i=$(( $i + 1 )) || exit 1
                done
        ) &&
        git status --porcelain sub 2>err.actual &&