t3000-t3999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eric Sunshine committed Jul 1, 2018 at 20:23 UTC 3ea673799368524f3ec5f671f588a07554c61576
10 files changed +28 -28
t/t3000-ls-files-others.sh
+1 -1
@@ -84,7 +84,7 @@ test_expect_success SYMLINKS 'ls-files --others with symlinked submodule' '
84 ) &&
85 (
86 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 &&
88 git ls-files --others --exclude-standard >../actual
89 ) &&
90 echo sub/ >expect &&
t/t3006-ls-files-long.sh
+1 -1
@@ -29,7 +29,7 @@ test_expect_success 'overly-long path does not replace another by mistake' '
29 printf "$pat" "$blob_a" "$path_a" "$blob_z" "$path_z" |
30 git update-index --add --index-info &&
31 (
32 - echo "$path_a"
32 + echo "$path_a" &&
33 echo "$path_z"
34 ) >expect &&
35 git ls-files >actual &&
t/t3008-ls-files-lazy-init-name-hash.sh
+4 -4
@@ -14,10 +14,10 @@ LAZY_THREAD_COST=2000
14
15 test_expect_success 'no buffer overflow in lazy_init_name_hash' '
16 (
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
21 ) |
22 sed "s/^/100644 $EMPTY_BLOB /" |
23 git update-index --index-info &&
t/t3050-subprojects-fetch.sh
+4 -4
@@ -21,10 +21,10 @@ test_expect_success setup '
21
22 test_expect_success clone '
23 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 &&
25 (
26 cd cloned &&
27 - (git rev-parse HEAD; git ls-files -s) >../actual
27 + (git rev-parse HEAD && git ls-files -s) >../actual
28 ) &&
29 test_cmp expected actual
30 '
@@ -40,11 +40,11 @@ test_expect_success advance '
40 '
41
42 test_expect_success fetch '
43 - (git rev-parse HEAD; git ls-files -s) >expected &&
43 + (git rev-parse HEAD && git ls-files -s) >expected &&
44 (
45 cd cloned &&
46 git pull &&
47 - (git rev-parse HEAD; git ls-files -s) >../actual
47 + (git rev-parse HEAD && git ls-files -s) >../actual
48 ) &&
49 test_cmp expected actual
50 '
t/t3210-pack-refs.sh
+2 -2
@@ -231,9 +231,9 @@ test_expect_success 'timeout if packed-refs.lock exists' '
231 test_expect_success 'retry acquiring packed-refs.lock' '
232 LOCK=.git/packed-refs.lock &&
233 >"$LOCK" &&
234 - test_when_finished "wait; rm -f $LOCK" &&
234 + test_when_finished "wait && rm -f $LOCK" &&
235 {
236 - ( sleep 1 ; rm -f $LOCK ) &
236 + ( sleep 1 && rm -f $LOCK ) &
237 } &&
238 git -c core.packedrefstimeout=3000 pack-refs --all --prune
239 '
t/t3301-notes.sh
+4 -4
@@ -914,7 +914,7 @@ test_expect_success 'git notes copy --stdin' '
914 ${indent}
915 ${indent}yet another note
916 EOF
917 - (echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
917 + (echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
918 echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
919 git notes copy --stdin &&
920 git log -2 >actual &&
@@ -939,7 +939,7 @@ test_expect_success 'git notes copy --for-rewrite (unconfigured)' '
939 EOF
940 test_commit 14th &&
941 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^) &&
943 echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
944 git notes copy --for-rewrite=foo &&
945 git log -2 >actual &&
@@ -972,7 +972,7 @@ test_expect_success 'git notes copy --for-rewrite (enabled)' '
972 EOF
973 test_config notes.rewriteMode overwrite &&
974 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^) &&
976 echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
977 git notes copy --for-rewrite=foo &&
978 git log -2 >actual &&
@@ -1059,7 +1059,7 @@ test_expect_success 'git notes copy --for-rewrite (append two to one)' '
1059 git notes add -f -m"append 2" HEAD^^ &&
1060 test_config notes.rewriteMode concatenate &&
1061 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) &&
1063 echo $(git rev-parse HEAD^^) $(git rev-parse HEAD)) |
1064 git notes copy --for-rewrite=foo &&
1065 git log -1 >actual &&
t/t3400-rebase.sh
+4 -4
@@ -200,10 +200,10 @@ test_expect_success 'rebase -q is quiet' '
200
201 test_expect_success 'Rebase a commit that sprinkles CRs in' '
202 (
203 - echo "One"
204 - echo "TwoQ"
205 - echo "Three"
206 - echo "FQur"
203 + echo "One" &&
204 + echo "TwoQ" &&
205 + echo "Three" &&
206 + echo "FQur" &&
207 echo "Five"
208 ) | q_to_cr >CR &&
209 git add CR &&
t/t3402-rebase-merge.sh
+2 -2
@@ -25,7 +25,7 @@ test_expect_success setup '
25 git commit -a -m"master updates a bit more." &&
26
27 git checkout side &&
28 - (echo "0 $T" ; cat original) >renamed &&
28 + (echo "0 $T" && cat original) >renamed &&
29 git add renamed &&
30 git update-index --force-remove original &&
31 git commit -a -m"side renames and edits." &&
@@ -143,7 +143,7 @@ test_expect_success 'rebase -s funny -Xopt' '
143 git checkout -b test-funny master^ &&
144 test_commit funny &&
145 (
146 - PATH=./test-bin:$PATH
146 + PATH=./test-bin:$PATH &&
147 git rebase -s funny -Xopt master
148 ) &&
149 test -f funny.was.run
t/t3418-rebase-continue.sh
+2 -2
@@ -60,7 +60,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '
60 EOF
61 chmod +x test-bin/git-merge-funny &&
62 (
63 - PATH=./test-bin:$PATH
63 + PATH=./test-bin:$PATH &&
64 test_must_fail git rebase -s funny -Xopt master topic
65 ) &&
66 test -f funny.was.run &&
@@ -68,7 +68,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '
68 echo "Resolved" >F2 &&
69 git add F2 &&
70 (
71 - PATH=./test-bin:$PATH
71 + PATH=./test-bin:$PATH &&
72 git rebase --continue
73 ) &&
74 test -f funny.was.run
t/t3700-add.sh
+4 -4
@@ -156,9 +156,9 @@ test_expect_success 'git add with filemode=0, symlinks=0, and unmerged entries'
156 test_expect_success 'git add with filemode=0, symlinks=0 prefers stage 2 over stage 1' '
157 git rm --cached -f file symlink &&
158 (
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" &&
162 echo "120000 $(printf 2 | git hash-object -w -t blob --stdin) 2 symlink"
163 ) | git update-index --index-info &&
164 git config core.filemode 0 &&
@@ -265,7 +265,7 @@ test_expect_success 'git add to resolve conflicts on otherwise ignored path' '
265 git reset --hard &&
266 H=$(git rev-parse :1/2/a) &&
267 (
268 - echo "100644 $H 1 track-this"
268 + echo "100644 $H 1 track-this" &&
269 echo "100644 $H 3 track-this"
270 ) | git update-index --index-info &&
271 echo track-this >>.gitignore &&