Skip to content

Commit 1c0ab5c

Browse files
charvi-077gitster
authored andcommitted
t7201: put each command on a separate line
Modern practice is to avoid multiple commands per line, and instead place each command on its own line. Signed-off-by: Charvi Mendiratta <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 627f2d7 commit 1c0ab5c

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

t/t7201-co.sh

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ test_expect_success 'checkout -m with merge conflict' '
157157
'
158158

159159
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 &&
161162
162163
fill b d >two &&
163164
git checkout -m simple &&
@@ -180,7 +181,9 @@ test_expect_success 'format of merge conflict from checkout -m' '
180181
'
181182

182183
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 &&
184187
185188
fill b d >two &&
186189
git checkout --merge --conflict=diff3 simple &&
@@ -205,7 +208,9 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '
205208
'
206209

207210
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 &&
209214
git rm two &&
210215
211216
test_must_fail git checkout simple 2>errs &&
@@ -218,7 +223,8 @@ test_expect_success 'switch to another branch while carrying a deletion' '
218223
test_expect_success 'checkout to detach HEAD (with advice declined)' '
219224
git config advice.detachedHead false &&
220225
rev=$(git rev-parse --short renamer^) &&
221-
git checkout -f renamer && git clean -f &&
226+
git checkout -f renamer &&
227+
git clean -f &&
222228
git checkout renamer^ 2>messages &&
223229
test_i18ngrep "HEAD is now at $rev" messages &&
224230
test_line_count = 1 messages &&
@@ -237,7 +243,8 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '
237243
test_expect_success 'checkout to detach HEAD' '
238244
git config advice.detachedHead true &&
239245
rev=$(git rev-parse --short renamer^) &&
240-
git checkout -f renamer && git clean -f &&
246+
git checkout -f renamer &&
247+
git clean -f &&
241248
GIT_TEST_GETTEXT_POISON=false git checkout renamer^ 2>messages &&
242249
grep "HEAD is now at $rev" messages &&
243250
test_line_count -gt 1 messages &&
@@ -254,7 +261,8 @@ test_expect_success 'checkout to detach HEAD' '
254261
'
255262

256263
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 &&
258266
git checkout renamer^ &&
259267
H=$(git rev-parse --verify HEAD) &&
260268
M=$(git show-ref -s --verify refs/heads/master) &&
@@ -269,7 +277,8 @@ test_expect_success 'checkout to detach HEAD with branchname^' '
269277
'
270278

271279
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 &&
273282
git checkout ":/Initial" &&
274283
H=$(git rev-parse --verify HEAD) &&
275284
M=$(git show-ref -s --verify refs/heads/master) &&
@@ -284,7 +293,8 @@ test_expect_success 'checkout to detach HEAD with :/message' '
284293
'
285294

286295
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 &&
288298
git checkout HEAD^0 &&
289299
H=$(git rev-parse --verify HEAD) &&
290300
M=$(git show-ref -s --verify refs/heads/master) &&

0 commit comments

Comments
 (0)