Skip to content

Commit 3ea6737

Browse files
sunshinecogitster
authored andcommitted
t3000-t3999: fix broken &&-chains
Signed-off-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2c2d0f9 commit 3ea6737

10 files changed

+28
-28
lines changed

t/t3000-ls-files-others.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ test_expect_success SYMLINKS 'ls-files --others with symlinked submodule' '
8484
) &&
8585
(
8686
cd super &&
87-
"$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" ../sub sub
87+
"$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" ../sub sub &&
8888
git ls-files --others --exclude-standard >../actual
8989
) &&
9090
echo sub/ >expect &&

t/t3006-ls-files-long.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test_expect_success 'overly-long path does not replace another by mistake' '
2929
printf "$pat" "$blob_a" "$path_a" "$blob_z" "$path_z" |
3030
git update-index --add --index-info &&
3131
(
32-
echo "$path_a"
32+
echo "$path_a" &&
3333
echo "$path_z"
3434
) >expect &&
3535
git ls-files >actual &&

t/t3008-ls-files-lazy-init-name-hash.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ LAZY_THREAD_COST=2000
1414

1515
test_expect_success 'no buffer overflow in lazy_init_name_hash' '
1616
(
17-
test_seq $LAZY_THREAD_COST | sed "s/^/a_/"
18-
echo b/b/b
19-
test_seq $LAZY_THREAD_COST | sed "s/^/c_/"
20-
test_seq 50 | sed "s/^/d_/" | tr "\n" "/"; echo d
17+
test_seq $LAZY_THREAD_COST | sed "s/^/a_/" &&
18+
echo b/b/b &&
19+
test_seq $LAZY_THREAD_COST | sed "s/^/c_/" &&
20+
test_seq 50 | sed "s/^/d_/" | tr "\n" "/" && echo d
2121
) |
2222
sed "s/^/100644 $EMPTY_BLOB /" |
2323
git update-index --index-info &&

t/t3050-subprojects-fetch.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ test_expect_success setup '
2121

2222
test_expect_success clone '
2323
git clone "file://$(pwd)/.git" cloned &&
24-
(git rev-parse HEAD; git ls-files -s) >expected &&
24+
(git rev-parse HEAD && git ls-files -s) >expected &&
2525
(
2626
cd cloned &&
27-
(git rev-parse HEAD; git ls-files -s) >../actual
27+
(git rev-parse HEAD && git ls-files -s) >../actual
2828
) &&
2929
test_cmp expected actual
3030
'
@@ -40,11 +40,11 @@ test_expect_success advance '
4040
'
4141

4242
test_expect_success fetch '
43-
(git rev-parse HEAD; git ls-files -s) >expected &&
43+
(git rev-parse HEAD && git ls-files -s) >expected &&
4444
(
4545
cd cloned &&
4646
git pull &&
47-
(git rev-parse HEAD; git ls-files -s) >../actual
47+
(git rev-parse HEAD && git ls-files -s) >../actual
4848
) &&
4949
test_cmp expected actual
5050
'

t/t3210-pack-refs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ test_expect_success 'timeout if packed-refs.lock exists' '
231231
test_expect_success 'retry acquiring packed-refs.lock' '
232232
LOCK=.git/packed-refs.lock &&
233233
>"$LOCK" &&
234-
test_when_finished "wait; rm -f $LOCK" &&
234+
test_when_finished "wait && rm -f $LOCK" &&
235235
{
236-
( sleep 1 ; rm -f $LOCK ) &
236+
( sleep 1 && rm -f $LOCK ) &
237237
} &&
238238
git -c core.packedrefstimeout=3000 pack-refs --all --prune
239239
'

t/t3301-notes.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ test_expect_success 'git notes copy --stdin' '
914914
${indent}
915915
${indent}yet another note
916916
EOF
917-
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
917+
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
918918
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
919919
git notes copy --stdin &&
920920
git log -2 >actual &&
@@ -939,7 +939,7 @@ test_expect_success 'git notes copy --for-rewrite (unconfigured)' '
939939
EOF
940940
test_commit 14th &&
941941
test_commit 15th &&
942-
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
942+
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
943943
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
944944
git notes copy --for-rewrite=foo &&
945945
git log -2 >actual &&
@@ -972,7 +972,7 @@ test_expect_success 'git notes copy --for-rewrite (enabled)' '
972972
EOF
973973
test_config notes.rewriteMode overwrite &&
974974
test_config notes.rewriteRef "refs/notes/*" &&
975-
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
975+
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
976976
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
977977
git notes copy --for-rewrite=foo &&
978978
git log -2 >actual &&
@@ -1059,7 +1059,7 @@ test_expect_success 'git notes copy --for-rewrite (append two to one)' '
10591059
git notes add -f -m"append 2" HEAD^^ &&
10601060
test_config notes.rewriteMode concatenate &&
10611061
test_config notes.rewriteRef "refs/notes/*" &&
1062-
(echo $(git rev-parse HEAD^) $(git rev-parse HEAD);
1062+
(echo $(git rev-parse HEAD^) $(git rev-parse HEAD) &&
10631063
echo $(git rev-parse HEAD^^) $(git rev-parse HEAD)) |
10641064
git notes copy --for-rewrite=foo &&
10651065
git log -1 >actual &&

t/t3400-rebase.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ test_expect_success 'rebase -q is quiet' '
200200

201201
test_expect_success 'Rebase a commit that sprinkles CRs in' '
202202
(
203-
echo "One"
204-
echo "TwoQ"
205-
echo "Three"
206-
echo "FQur"
203+
echo "One" &&
204+
echo "TwoQ" &&
205+
echo "Three" &&
206+
echo "FQur" &&
207207
echo "Five"
208208
) | q_to_cr >CR &&
209209
git add CR &&

t/t3402-rebase-merge.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test_expect_success setup '
2525
git commit -a -m"master updates a bit more." &&
2626
2727
git checkout side &&
28-
(echo "0 $T" ; cat original) >renamed &&
28+
(echo "0 $T" && cat original) >renamed &&
2929
git add renamed &&
3030
git update-index --force-remove original &&
3131
git commit -a -m"side renames and edits." &&
@@ -143,7 +143,7 @@ test_expect_success 'rebase -s funny -Xopt' '
143143
git checkout -b test-funny master^ &&
144144
test_commit funny &&
145145
(
146-
PATH=./test-bin:$PATH
146+
PATH=./test-bin:$PATH &&
147147
git rebase -s funny -Xopt master
148148
) &&
149149
test -f funny.was.run

t/t3418-rebase-continue.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '
6060
EOF
6161
chmod +x test-bin/git-merge-funny &&
6262
(
63-
PATH=./test-bin:$PATH
63+
PATH=./test-bin:$PATH &&
6464
test_must_fail git rebase -s funny -Xopt master topic
6565
) &&
6666
test -f funny.was.run &&
6767
rm funny.was.run &&
6868
echo "Resolved" >F2 &&
6969
git add F2 &&
7070
(
71-
PATH=./test-bin:$PATH
71+
PATH=./test-bin:$PATH &&
7272
git rebase --continue
7373
) &&
7474
test -f funny.was.run

t/t3700-add.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ test_expect_success 'git add with filemode=0, symlinks=0, and unmerged entries'
156156
test_expect_success 'git add with filemode=0, symlinks=0 prefers stage 2 over stage 1' '
157157
git rm --cached -f file symlink &&
158158
(
159-
echo "100644 $(git hash-object -w stage1) 1 file"
160-
echo "100755 $(git hash-object -w stage2) 2 file"
161-
echo "100644 $(printf 1 | git hash-object -w -t blob --stdin) 1 symlink"
159+
echo "100644 $(git hash-object -w stage1) 1 file" &&
160+
echo "100755 $(git hash-object -w stage2) 2 file" &&
161+
echo "100644 $(printf 1 | git hash-object -w -t blob --stdin) 1 symlink" &&
162162
echo "120000 $(printf 2 | git hash-object -w -t blob --stdin) 2 symlink"
163163
) | git update-index --index-info &&
164164
git config core.filemode 0 &&
@@ -265,7 +265,7 @@ test_expect_success 'git add to resolve conflicts on otherwise ignored path' '
265265
git reset --hard &&
266266
H=$(git rev-parse :1/2/a) &&
267267
(
268-
echo "100644 $H 1 track-this"
268+
echo "100644 $H 1 track-this" &&
269269
echo "100644 $H 3 track-this"
270270
) | git update-index --index-info &&
271271
echo track-this >>.gitignore &&

0 commit comments

Comments
 (0)