@@ -157,7 +157,8 @@ test_expect_success 'checkout -m with merge conflict' '
157
157
'
158
158
159
159
test_expect_success ' format of merge conflict from checkout -m' '
160
- git checkout -f master && git clean -f &&
160
+ git checkout -f master &&
161
+ git clean -f &&
161
162
162
163
fill b d >two &&
163
164
git checkout -m simple &&
@@ -180,7 +181,9 @@ test_expect_success 'format of merge conflict from checkout -m' '
180
181
'
181
182
182
183
test_expect_success ' checkout --merge --conflict=diff3 <branch>' '
183
- git checkout -f master && git reset --hard && git clean -f &&
184
+ git checkout -f master &&
185
+ git reset --hard &&
186
+ git clean -f &&
184
187
185
188
fill b d >two &&
186
189
git checkout --merge --conflict=diff3 simple &&
@@ -205,7 +208,9 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '
205
208
'
206
209
207
210
test_expect_success ' switch to another branch while carrying a deletion' '
208
- git checkout -f master && git reset --hard && git clean -f &&
211
+ git checkout -f master &&
212
+ git reset --hard &&
213
+ git clean -f &&
209
214
git rm two &&
210
215
211
216
test_must_fail git checkout simple 2>errs &&
@@ -218,7 +223,8 @@ test_expect_success 'switch to another branch while carrying a deletion' '
218
223
test_expect_success ' checkout to detach HEAD (with advice declined)' '
219
224
git config advice.detachedHead false &&
220
225
rev=$(git rev-parse --short renamer^) &&
221
- git checkout -f renamer && git clean -f &&
226
+ git checkout -f renamer &&
227
+ git clean -f &&
222
228
git checkout renamer^ 2>messages &&
223
229
test_i18ngrep "HEAD is now at $rev" messages &&
224
230
test_line_count = 1 messages &&
@@ -237,7 +243,8 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '
237
243
test_expect_success ' checkout to detach HEAD' '
238
244
git config advice.detachedHead true &&
239
245
rev=$(git rev-parse --short renamer^) &&
240
- git checkout -f renamer && git clean -f &&
246
+ git checkout -f renamer &&
247
+ git clean -f &&
241
248
GIT_TEST_GETTEXT_POISON=false git checkout renamer^ 2>messages &&
242
249
grep "HEAD is now at $rev" messages &&
243
250
test_line_count -gt 1 messages &&
@@ -254,7 +261,8 @@ test_expect_success 'checkout to detach HEAD' '
254
261
'
255
262
256
263
test_expect_success ' checkout to detach HEAD with branchname^' '
257
- git checkout -f master && git clean -f &&
264
+ git checkout -f master &&
265
+ git clean -f &&
258
266
git checkout renamer^ &&
259
267
H=$(git rev-parse --verify HEAD) &&
260
268
M=$(git show-ref -s --verify refs/heads/master) &&
@@ -269,7 +277,8 @@ test_expect_success 'checkout to detach HEAD with branchname^' '
269
277
'
270
278
271
279
test_expect_success ' checkout to detach HEAD with :/message' '
272
- git checkout -f master && git clean -f &&
280
+ git checkout -f master &&
281
+ git clean -f &&
273
282
git checkout ":/Initial" &&
274
283
H=$(git rev-parse --verify HEAD) &&
275
284
M=$(git show-ref -s --verify refs/heads/master) &&
@@ -284,7 +293,8 @@ test_expect_success 'checkout to detach HEAD with :/message' '
284
293
'
285
294
286
295
test_expect_success ' checkout to detach HEAD with HEAD^0' '
287
- git checkout -f master && git clean -f &&
296
+ git checkout -f master &&
297
+ git clean -f &&
288
298
git checkout HEAD^0 &&
289
299
H=$(git rev-parse --verify HEAD) &&
290
300
M=$(git show-ref -s --verify refs/heads/master) &&
0 commit comments