]> git.ipfire.org Git - thirdparty/git.git/commitdiff
tests: fix broken &&-chains in compound statements
authorEric Sunshine <sunshine@sunshineco.com>
Thu, 9 Dec 2021 05:11:06 +0000 (00:11 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Dec 2021 18:29:48 +0000 (10:29 -0800)
The top-level &&-chain checker built into t/test-lib.sh causes tests to
magically exit with code 117 if the &&-chain is broken. However, it has
the shortcoming that the magic does not work within `{...}` groups,
`(...)` subshells, `$(...)` substitutions, or within bodies of compound
statements, such as `if`, `for`, `while`, `case`, etc. `chainlint.sed`
partly fills in the gap by catching broken &&-chains in `(...)`
subshells, but bugs can still lurk behind broken &&-chains in the other
cases.

Fix broken &&-chains in compound statements in order to reduce the
number of possible lurking bugs.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
28 files changed:
t/perf/p0005-status.sh
t/perf/p0006-read-tree-checkout.sh
t/perf/p0007-write-cache.sh
t/perf/p5302-pack-index.sh
t/perf/p5303-many-packs.sh
t/t1050-large.sh
t/t1300-config.sh
t/t1700-split-index.sh
t/t2200-add-update.sh
t/t3070-wildmatch.sh
t/t3700-add.sh
t/t4046-diff-unmerged.sh
t/t4123-apply-shrink.sh
t/t4138-apply-ws-expansion.sh
t/t5302-pack-index.sh
t/t5317-pack-objects-filter-objects.sh
t/t5571-pre-push-hook.sh
t/t5616-partial-clone.sh
t/t6005-rev-list-count.sh
t/t6009-rev-list-parent.sh
t/t6112-rev-list-filters-objects.sh
t/t6120-describe.sh
t/t6407-merge-binary.sh
t/t6412-merge-large-rename.sh
t/t7004-tag.sh
t/t7519-status-fsmonitor.sh
t/t7602-merge-octopus-many.sh
t/t9130-git-svn-authors-file.sh

index 0b0aa9858f5dbf16f5c98639e25a8891846fe300..ca58d6c9b59493a37d4bf301e2c2d099fd841e91 100755 (executable)
@@ -24,17 +24,17 @@ test_perf_default_repo
 test_expect_success "setup repo" '
        if git rev-parse --verify refs/heads/p0006-ballast^{commit}
        then
-               echo Assuming synthetic repo from many-files.sh
-               git branch br_base            master
-               git branch br_ballast         p0006-ballast
-               git config --local core.sparsecheckout 1
+               echo Assuming synthetic repo from many-files.sh &&
+               git branch br_base            master &&
+               git branch br_ballast         p0006-ballast &&
+               git config --local core.sparsecheckout 1 &&
                cat >.git/info/sparse-checkout <<-EOF
                /*
                !ballast/*
                EOF
        else
-               echo Assuming non-synthetic repo...
-               git branch br_base            $(git rev-list HEAD | tail -n 1)
+               echo Assuming non-synthetic repo... &&
+               git branch br_base            $(git rev-list HEAD | tail -n 1) &&
                git branch br_ballast         HEAD
        fi &&
        git checkout -q br_ballast &&
index 78cc23fe2f32eff777aab058b12d109ac81bc83c..900b385c4bbc2d0bf9a803f06b48fe1c25909e86 100755 (executable)
@@ -24,21 +24,21 @@ test_perf_default_repo
 test_expect_success "setup repo" '
        if git rev-parse --verify refs/heads/p0006-ballast^{commit}
        then
-               echo Assuming synthetic repo from many-files.sh
-               git branch br_base            master
-               git branch br_ballast         p0006-ballast^
-               git branch br_ballast_alias   p0006-ballast^
-               git branch br_ballast_plus_1  p0006-ballast
-               git config --local core.sparsecheckout 1
+               echo Assuming synthetic repo from many-files.sh &&
+               git branch br_base            master &&
+               git branch br_ballast         p0006-ballast^ &&
+               git branch br_ballast_alias   p0006-ballast^ &&
+               git branch br_ballast_plus_1  p0006-ballast &&
+               git config --local core.sparsecheckout 1 &&
                cat >.git/info/sparse-checkout <<-EOF
                /*
                !ballast/*
                EOF
        else
-               echo Assuming non-synthetic repo...
-               git branch br_base            $(git rev-list HEAD | tail -n 1)
-               git branch br_ballast         HEAD^ || error "no ancestor commit from current head"
-               git branch br_ballast_alias   HEAD^
+               echo Assuming non-synthetic repo... &&
+               git branch br_base            $(git rev-list HEAD | tail -n 1) &&
+               git branch br_ballast         HEAD^ || error "no ancestor commit from current head" &&
+               git branch br_ballast_alias   HEAD^ &&
                git branch br_ballast_plus_1  HEAD
        fi &&
        git checkout -q br_ballast &&
index 09595264f09fa4b1dc28b3e5d2a3d6482d998bcc..25d8ff7443e77cafbcda0a5b08ed2335d2e798f9 100755 (executable)
@@ -9,8 +9,8 @@ test_perf_default_repo
 test_expect_success "setup repo" '
        if git rev-parse --verify refs/heads/p0006-ballast^{commit}
        then
-               echo Assuming synthetic repo from many-files.sh
-               git config --local core.sparsecheckout 1
+               echo Assuming synthetic repo from many-files.sh &&
+               git config --local core.sparsecheckout 1 &&
                cat >.git/info/sparse-checkout <<-EOF
                /*
                !ballast/*
index 228593d9ad6b3a5c9a0b45eb5814a3a8746d42bc..654cd9c86e13d0e26eac2470771d104a8075896e 100755 (executable)
@@ -21,7 +21,7 @@ test_expect_success 'set up thread-counting tests' '
        threads= &&
        while test $t -gt 0
        do
-               threads="$t $threads"
+               threads="$t $threads" &&
                t=$((t / 2))
        done
 '
index 35c0cbdf49fbc14d659f9abff7e8624a6ae14cec..58213fe171f1a4769de6cb41db07c92ff8a837a2 100755 (executable)
@@ -126,10 +126,10 @@ done
 # Measure pack loading with 10,000 packs.
 test_expect_success 'generate lots of packs' '
        for i in $(test_seq 10000); do
-               echo "blob"
-               echo "data <<EOF"
-               echo "blob $i"
-               echo "EOF"
+               echo "blob" &&
+               echo "data <<EOF" &&
+               echo "blob $i" &&
+               echo "EOF" &&
                echo "checkpoint"
        done |
        git -c fastimport.unpackLimit=0 fast-import
index 6bc1d76fb108f38f1fdb9a68904c5251866149fb..99ff2866b7540bdad6f8462b385f4348a8efd025 100755 (executable)
@@ -54,7 +54,7 @@ test_expect_success 'add a large file or two' '
        bad= count=0 idx= &&
        for p in .git/objects/pack/pack-*.pack
        do
-               count=$(( $count + 1 ))
+               count=$(( $count + 1 )) &&
                if test_path_is_file "$p" &&
                   idx=${p%.pack}.idx && test_path_is_file "$idx"
                then
@@ -78,7 +78,7 @@ test_expect_success 'add a large file or two' '
        bad= count=0 &&
        for p in .git/objects/pack/pack-*.pack
        do
-               count=$(( $count + 1 ))
+               count=$(( $count + 1 )) &&
                if test_path_is_file "$p" &&
                   idx=${p%.pack}.idx && test_path_is_file "$idx"
                then
index 9ff46f3b0471fb146bec00329459040619edd88e..9571649c425e3d1355c5226c45866d59e6dcd1a3 100755 (executable)
@@ -717,7 +717,7 @@ test_expect_success bool '
        rm -f result &&
        for i in 1 2 3 4
        do
-           git config --bool --get bool.true$i >>result
+           git config --bool --get bool.true$i >>result &&
            git config --bool --get bool.false$i >>result
        done &&
        test_cmp expect result'
index decd2527ed6427fe760d082cedc8a37d0df4f312..b4ab166369ec06c69add33eb240d69531459276c 100755 (executable)
@@ -48,10 +48,10 @@ test_expect_success 'enable split index' '
        # NEEDSWORK: Stop hard-coding checksums.
        if test "$indexversion" = "4"
        then
-               own=$(test_oid own_v4)
+               own=$(test_oid own_v4) &&
                base=$(test_oid base_v4)
        else
-               own=$(test_oid own_v3)
+               own=$(test_oid own_v3) &&
                base=$(test_oid base_v3)
        fi &&
 
index 94c4cb0672126c6ae0440598a68e99182a4cffbf..67b9cc752f8ffb633e9a66780c0471f76a8d2152 100755 (executable)
@@ -150,8 +150,8 @@ test_expect_success 'add -u resolves unmerged paths' '
        {
                for path in path1 path2
                do
-                       echo "100644 $one 1     $path"
-                       echo "100644 $two 2     $path"
+                       echo "100644 $one 1     $path" &&
+                       echo "100644 $two 2     $path" &&
                        echo "100644 $three 3   $path"
                done
                echo "100644 $one 1     path3"
index 72d5b014d82c6c3fbdbf693a791e8599138594c0..f9539968e4c16a53e2d0add8b448c7338925828f 100755 (executable)
@@ -193,7 +193,7 @@ match() {
                file=$(cat .git/expected_test_file) &&
                if should_create_test_file "$file"
                then
-                       dirs=${file%/*}
+                       dirs=${file%/*} &&
                        if test "$file" != "$dirs"
                        then
                                mkdir -p -- "$dirs" &&
index 283a66955d6dbb8415697a8a911effa6f291f8e9..23c3c214c579f7edc8c8d47452921f0daee436db 100755 (executable)
@@ -141,8 +141,8 @@ test_expect_success 'check correct prefix detection' '
 test_expect_success 'git add with filemode=0, symlinks=0, and unmerged entries' '
        for s in 1 2 3
        do
-               echo $s > stage$s
-               echo "100755 $(git hash-object -w stage$s) $s   file"
+               echo $s > stage$s &&
+               echo "100755 $(git hash-object -w stage$s) $s   file" &&
                echo "120000 $(printf $s | git hash-object -w -t blob --stdin) $s       symlink"
        done | git update-index --index-info &&
        git config core.filemode 0 &&
index ff7cfd884a44ebe0844c7ac6a21f25ed8374e7d4..8c3d48e25703ed3d2f32abca9329893250cdde91 100755 (executable)
@@ -18,7 +18,7 @@ test_expect_success setup '
                        for t in o x
                        do
                                path="$b$o$t" &&
-                               case "$path" in ooo) continue ;; esac
+                               case "$path" in ooo) continue ;; esac &&
                                paths="$paths$path " &&
                                p="     $path" &&
                                case "$b" in x) echo "$m1$p" ;; esac &&
index 984157f03b9744aa491c888fab9e6aef95dfdc6b..51e69cf79e4a3ef336907c06a822a6c68d6e4b38 100755 (executable)
@@ -45,8 +45,8 @@ test_expect_success 'apply should fail gracefully' '
                echo Oops, should not have succeeded
                false
        else
-               status=$?
-               echo "Status was $status"
+               status=$? &&
+               echo "Status was $status" &&
                if test -f .git/index.lock
                then
                        echo Oops, should not have crashed
index b19faeb67a3cffcc241ef2487ab8f4d0c598af2a..4ba52bbb61395208e67dfcae5a3e3792c329b9ae 100755 (executable)
@@ -29,7 +29,7 @@ test_expect_success setup '
        x=1 &&
        while test $x -lt $n
        do
-               printf "%63s%d\n" "" $x >>after
+               printf "%63s%d\n" "" $x >>after &&
                x=$(( $x + 1 ))
        done &&
        printf "\t%s\n" d e f >>after &&
@@ -40,7 +40,7 @@ test_expect_success setup '
        x=1 &&
        while test $x -lt $n
        do
-               printf "%63s%d\n" "" $x >>expect-2
+               printf "%63s%d\n" "" $x >>expect-2 &&
                x=$(( $x + 1 ))
        done &&
        printf "%64s\n" d e f >>expect-2 &&
@@ -52,7 +52,7 @@ test_expect_success setup '
        x=0 &&
        while test $x -lt $n
        do
-               printf "%63s%02d\n" "" $x >>after
+               printf "%63s%02d\n" "" $x >>after &&
                x=$(( $x + 1 ))
        done &&
        printf "\t%s\n" d e f >>after &&
@@ -63,7 +63,7 @@ test_expect_success setup '
        x=0 &&
        while test $x -lt $n
        do
-               printf "%63s%02d\n" "" $x >>expect-3
+               printf "%63s%02d\n" "" $x >>expect-3 &&
                x=$(( $x + 1 ))
        done &&
        printf "%64s\n" d e f >>expect-3 &&
@@ -73,15 +73,15 @@ test_expect_success setup '
        x=0 &&
        while test $x -lt 50
        do
-               printf "\t%02d\n" $x >>before
+               printf "\t%02d\n" $x >>before &&
                x=$(( $x + 1 ))
        done &&
        cat before >after &&
        printf "%64s\n" a b c >>after &&
        while test $x -lt 100
        do
-               printf "\t%02d\n" $x >>before
-               printf "\t%02d\n" $x >>after
+               printf "\t%02d\n" $x >>before &&
+               printf "\t%02d\n" $x >>after &&
                x=$(( $x + 1 ))
        done &&
        test_expect_code 1 git diff --no-index before after >patch4.patch.raw &&
@@ -90,15 +90,15 @@ test_expect_success setup '
        x=0 &&
        while test $x -lt 50
        do
-               printf "%63s%02d\n" "" $x >>test-4
+               printf "%63s%02d\n" "" $x >>test-4 &&
                x=$(( $x + 1 ))
        done &&
        cat test-4 >expect-4 &&
        printf "%64s\n" a b c >>expect-4 &&
        while test $x -lt 100
        do
-               printf "%63s%02d\n" "" $x >>test-4
-               printf "%63s%02d\n" "" $x >>expect-4
+               printf "%63s%02d\n" "" $x >>test-4 &&
+               printf "%63s%02d\n" "" $x >>expect-4 &&
                x=$(( $x + 1 ))
        done &&
 
index 7c9d687367088346191434b1ceac6dd3726dff1d..8ee67df38f6c1c272834adcc3deef239eab6dd30 100755 (executable)
@@ -14,7 +14,7 @@ test_expect_success 'setup' '
        i=1 &&
        while test $i -le 100
        do
-               iii=$(printf "%03i" $i)
+               iii=$(printf "%03i" $i) &&
                test-tool genrandom "bar" 200 > wide_delta_$iii &&
                test-tool genrandom "baz $iii" 50 >> wide_delta_$iii &&
                test-tool genrandom "foo"$i 100 > deep_delta_$iii &&
index 13ed3eb13652dcf07727f2a64b2b1f999604459c..8fb6acae47dee8920a6c1d07d7f65baacbfa5a98 100755 (executable)
@@ -16,8 +16,8 @@ test_expect_success 'setup r1' '
        git init r1 &&
        for n in 1 2 3 4 5
        do
-               echo "This is file: $n" > r1/file.$n
-               git -C r1 add file.$n
+               echo "This is file: $n" > r1/file.$n &&
+               git -C r1 add file.$n &&
                git -C r1 commit -m "$n"
        done
 '
@@ -116,8 +116,8 @@ test_expect_success 'setup r2' '
        git init r2 &&
        for n in 1000 10000
        do
-               printf "%"$n"s" X > r2/large.$n
-               git -C r2 add large.$n
+               printf "%"$n"s" X > r2/large.$n &&
+               git -C r2 add large.$n &&
                git -C r2 commit -m "$n"
        done
 '
@@ -278,9 +278,9 @@ test_expect_success 'setup r3' '
        mkdir r3/dir1 &&
        for n in sparse1 sparse2
        do
-               echo "This is file: $n" > r3/$n
-               git -C r3 add $n
-               echo "This is file: dir1/$n" > r3/dir1/$n
+               echo "This is file: $n" > r3/$n &&
+               git -C r3 add $n &&
+               echo "This is file: dir1/$n" > r3/dir1/$n &&
                git -C r3 add dir1/$n
        done &&
        git -C r3 commit -m "sparse" &&
@@ -331,9 +331,9 @@ test_expect_success 'setup r4' '
        mkdir r4/dir1 &&
        for n in sparse1 sparse2
        do
-               echo "This is file: $n" > r4/$n
-               git -C r4 add $n
-               echo "This is file: dir1/$n" > r4/dir1/$n
+               echo "This is file: $n" > r4/$n &&
+               git -C r4 add $n &&
+               echo "This is file: dir1/$n" > r4/dir1/$n &&
                git -C r4 add dir1/$n
        done &&
        echo dir1/ >r4/pattern &&
index ad8d5804f7b7df3995643db0f30a6b87c524ce36..b043a279f15f6ff3d85ba29dddd6f22eeaff6b1f 100755 (executable)
@@ -117,7 +117,7 @@ test_expect_success 'set up many-ref tests' '
                nr=1000
                while test $nr -lt 2000
                do
-                       nr=$(( $nr + 1 ))
+                       nr=$(( $nr + 1 )) &&
                        echo "create refs/heads/b/$nr $COMMIT3"
                done
        } | git update-ref --stdin
index cf3e82bdf5cc1c823709963402eb3396ba0ba01a..23c156e3991cc9643aa3c15437d92667059625da 100755 (executable)
@@ -16,9 +16,9 @@ test_expect_success 'setup normal src repo' '
        git init src &&
        for n in 1 2 3 4
        do
-               echo "This is file: $n" > src/file.$n.txt
-               git -C src add file.$n.txt
-               git -C src commit -m "file $n"
+               echo "This is file: $n" > src/file.$n.txt &&
+               git -C src add file.$n.txt &&
+               git -C src commit -m "file $n" &&
                git -C src ls-files -s file.$n.txt >>temp
        done &&
        awk -f print_2.awk <temp | sort >expect_1.oids &&
@@ -72,8 +72,8 @@ test_expect_success 'push new commits to server' '
        git -C src remote add srv "file://$(pwd)/srv.bare" &&
        for x in a b c d e
        do
-               echo "Mod file.1.txt $x" >>src/file.1.txt
-               git -C src add file.1.txt
+               echo "Mod file.1.txt $x" >>src/file.1.txt &&
+               git -C src add file.1.txt &&
                git -C src commit -m "mod $x"
        done &&
        git -C src blame main -- file.1.txt >expect.blame &&
@@ -114,8 +114,8 @@ test_expect_success 'verify blame causes dynamic object fetch' '
 test_expect_success 'push new commits to server for file.2.txt' '
        for x in a b c d e f
        do
-               echo "Mod file.2.txt $x" >>src/file.2.txt
-               git -C src add file.2.txt
+               echo "Mod file.2.txt $x" >>src/file.2.txt &&
+               git -C src add file.2.txt &&
                git -C src commit -m "mod $x"
        done &&
        git -C src push -u srv main
@@ -135,8 +135,8 @@ test_expect_success 'override inherited filter-spec using --no-filter' '
 test_expect_success 'push new commits to server for file.3.txt' '
        for x in a b c d e f
        do
-               echo "Mod file.3.txt $x" >>src/file.3.txt
-               git -C src add file.3.txt
+               echo "Mod file.3.txt $x" >>src/file.3.txt &&
+               git -C src add file.3.txt &&
                git -C src commit -m "mod $x"
        done &&
        git -C src push -u srv main
index 0b64822bf621dee5c9544f76013c0342412eaee6..2a2083e6bc262ab38d278dc1aa85184b50ea1492 100755 (executable)
@@ -5,10 +5,10 @@ test_description='git rev-list --max-count and --skip test'
 . ./test-lib.sh
 
 test_expect_success 'setup' '
-    for n in 1 2 3 4 5 ; do \
-        echo $n > a ; \
-        git add a ; \
-        git commit -m "$n" ; \
+    for n in 1 2 3 4 5 ; do
+       echo $n > a &&
+       git add a &&
+       git commit -m "$n"
     done
 '
 
index 63fa7c83130ba371913ac07db1f95d3e57991d35..dc8160aa45dacfa38135a1307077e349363c5497 100755 (executable)
@@ -142,7 +142,7 @@ test_expect_success 'ancestors with the same commit time' '
 
        test_tick_keep=$test_tick &&
        for i in 1 2 3 4 5 6 7 8; do
-               test_tick=$test_tick_keep
+               test_tick=$test_tick_keep &&
                test_commit t$i
        done &&
        git rev-list t1^! --not t$i >result &&
index 4ade105db385c3458d4549d596923bb4197c605d..9848425192365e0c3cf0748400b62045ae2549fc 100755 (executable)
@@ -16,8 +16,8 @@ test_expect_success 'setup r1' '
        git init r1 &&
        for n in 1 2 3 4 5
        do
-               echo "This is file: $n" > r1/file.$n
-               git -C r1 add file.$n
+               echo "This is file: $n" > r1/file.$n &&
+               git -C r1 add file.$n &&
                git -C r1 commit -m "$n"
        done
 '
@@ -73,8 +73,8 @@ test_expect_success 'setup r2' '
        git init r2 &&
        for n in 1000 10000
        do
-               printf "%"$n"s" X > r2/large.$n
-               git -C r2 add large.$n
+               printf "%"$n"s" X > r2/large.$n &&
+               git -C r2 add large.$n &&
                git -C r2 commit -m "$n"
        done
 '
@@ -245,9 +245,9 @@ test_expect_success 'setup r3' '
        mkdir r3/dir1 &&
        for n in sparse1 sparse2
        do
-               echo "This is file: $n" > r3/$n
-               git -C r3 add $n
-               echo "This is file: dir1/$n" > r3/dir1/$n
+               echo "This is file: $n" > r3/$n &&
+               git -C r3 add $n &&
+               echo "This is file: dir1/$n" > r3/dir1/$n &&
                git -C r3 add dir1/$n
        done &&
        git -C r3 commit -m "sparse" &&
index bae2419150b8b52244dda726a4d2eaf10c1405ce..9b2cc066f774775800d7245ac500c12c92e6d4a3 100755 (executable)
@@ -390,8 +390,11 @@ test_expect_success ULIMIT_STACK_SIZE 'name-rev works in a deep repo' '
 committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200
 data <<EOF
 commit #$i
-EOF"
-               test $i = 1 && echo "from refs/heads/main^0"
+EOF" &&
+               if test $i = 1
+               then
+                       echo "from refs/heads/main^0"
+               fi &&
                i=$(($i + 1))
        done | git fast-import &&
        git checkout main &&
index d4273f2575b24728a0fe6ff838ec13bbde2f70a2..4c4f690588d167c1d32b80746d5460e443b23df2 100755 (executable)
@@ -47,7 +47,7 @@ test_expect_success resolve '
                echo Oops, should not have succeeded
                false
        else
-               git ls-files -s >current
+               git ls-files -s >current &&
                test_cmp expect current
        fi
 '
@@ -62,7 +62,7 @@ test_expect_success recursive '
                echo Oops, should not have succeeded
                false
        else
-               git ls-files -s >current
+               git ls-files -s >current &&
                test_cmp expect current
        fi
 '
index c50d31572221eb934134f3ba5baa82577e03161d..ed40801380737d45e2c808066983d4b293b3a44f 100755 (executable)
@@ -47,7 +47,7 @@ test_rename() {
        git commit -a -m change=$n &&
        git checkout -b test$n HEAD^ &&
        for i in $(count $n); do
-               git rm $i
+               git rm $i &&
                make_text $i initial changed >$i.moved
        done &&
        git add . &&
index 082be85dffc7b1765471e11d2c580c853cf0965b..660cde5a63981679c6eb58377e71bd3b4a5007d2 100755 (executable)
@@ -1976,8 +1976,11 @@ test_expect_success ULIMIT_STACK_SIZE '--contains and --no-contains work in a de
 committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200
 data <<EOF
 commit #$i
-EOF"
-               test $i = 1 && echo "from refs/heads/main^0"
+EOF" &&
+               if test $i = 1
+               then
+                       echo "from refs/heads/main^0"
+               fi &&
                i=$(($i + 1))
        done | git fast-import &&
        git checkout main &&
index f488d930dfd73f37b1c01b52d4ce5732b38e1d8a..1b4160dc534cb060a86c9c8a6ac8ef3045070798 100755 (executable)
@@ -248,7 +248,7 @@ do
                git config core.preloadIndex $preload_val &&
                if test $preload_val = true
                then
-                       GIT_TEST_PRELOAD_INDEX=$preload_val; export GIT_TEST_PRELOAD_INDEX
+                       GIT_TEST_PRELOAD_INDEX=$preload_val && export GIT_TEST_PRELOAD_INDEX
                else
                        sane_unset GIT_TEST_PRELOAD_INDEX
                fi
index a9c816b47f269ad0bf073f97f50e03a6ba3890d7..ddf64dc5f75e7cc3524dffc2cedcb6a8b49230c0 100755 (executable)
@@ -29,7 +29,7 @@ test_expect_success 'merge c1 with c2, c3, c4, ... c29' '
        refs="" &&
        while test $i -le 30
        do
-               refs="$refs c$i"
+               refs="$refs c$i" &&
                i=$(expr $i + 1)
        done &&
        git merge $refs &&
index cb764bcadc72cd954d3727f6fbc4d1e0d1fe6c46..b4081fefbace5d6bb3083cdaf1825056b95dce56 100755 (executable)
@@ -59,7 +59,7 @@ test_expect_success 'authors-file against globs' '
        git svn clone --authors-file=svn-authors -s "$svnrepo"/aa aa-work &&
        for i in bb ee cc
        do
-               branch="aa/branches/$i"
+               branch="aa/branches/$i" &&
                svn_cmd mkdir -m "$branch" --username $i "$svnrepo/$branch"
        done
        '