Skip to content

Commit ec2c10b

Browse files
j6tpeff
authored andcommitted
modernize t9300: wrap lines after &&
It is customary to have each command in test snippets on its own line. Fix those instances that do not follow this guideline. Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Jeff King <[email protected]>
1 parent acf3af2 commit ec2c10b

File tree

1 file changed

+32
-16
lines changed

1 file changed

+32
-16
lines changed

t/t9300-fast-import.sh

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,20 @@ test_expect_success 'A: verify tree' '
130130

131131
echo "$file2_data" >expect
132132
test_expect_success 'A: verify file2' '
133-
git cat-file blob master:file2 >actual && test_cmp expect actual
133+
git cat-file blob master:file2 >actual &&
134+
test_cmp expect actual
134135
'
135136

136137
echo "$file3_data" >expect
137138
test_expect_success 'A: verify file3' '
138-
git cat-file blob master:file3 >actual && test_cmp expect actual
139+
git cat-file blob master:file3 >actual &&
140+
test_cmp expect actual
139141
'
140142

141143
printf "$file4_data" >expect
142144
test_expect_success 'A: verify file4' '
143-
git cat-file blob master:file4 >actual && test_cmp expect actual
145+
git cat-file blob master:file4 >actual &&
146+
test_cmp expect actual
144147
'
145148

146149
cat >expect <<EOF
@@ -1656,10 +1659,14 @@ INPUT_END
16561659
test_expect_success 'P: superproject & submodule mix' '
16571660
git fast-import <input &&
16581661
git checkout subuse1 &&
1659-
rm -rf sub && mkdir sub && (cd sub &&
1660-
git init &&
1661-
git fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&
1662-
git checkout master) &&
1662+
rm -rf sub &&
1663+
mkdir sub &&
1664+
(
1665+
cd sub &&
1666+
git init &&
1667+
git fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&
1668+
git checkout master
1669+
) &&
16631670
git submodule init &&
16641671
git submodule update
16651672
'
@@ -1697,7 +1704,8 @@ INPUT_END
16971704

16981705
test_expect_success 'P: verbatim SHA gitlinks' '
16991706
git branch -D sub &&
1700-
git gc && git prune &&
1707+
git gc &&
1708+
git prune &&
17011709
git fast-import <input &&
17021710
test $(git rev-parse --verify subuse2) = $(git rev-parse --verify subuse1)
17031711
'
@@ -1942,17 +1950,20 @@ test_expect_success 'Q: verify first notes tree' '
19421950

19431951
echo "$note1_data" >expect
19441952
test_expect_success 'Q: verify first note for first commit' '
1945-
git cat-file blob refs/notes/foobar~2:$commit1 >actual && test_cmp expect actual
1953+
git cat-file blob refs/notes/foobar~2:$commit1 >actual &&
1954+
test_cmp expect actual
19461955
'
19471956

19481957
echo "$note2_data" >expect
19491958
test_expect_success 'Q: verify first note for second commit' '
1950-
git cat-file blob refs/notes/foobar~2:$commit2 >actual && test_cmp expect actual
1959+
git cat-file blob refs/notes/foobar~2:$commit2 >actual &&
1960+
test_cmp expect actual
19511961
'
19521962

19531963
echo "$note3_data" >expect
19541964
test_expect_success 'Q: verify first note for third commit' '
1955-
git cat-file blob refs/notes/foobar~2:$commit3 >actual && test_cmp expect actual
1965+
git cat-file blob refs/notes/foobar~2:$commit3 >actual &&
1966+
test_cmp expect actual
19561967
'
19571968

19581969
cat >expect <<EOF
@@ -1980,17 +1991,20 @@ test_expect_success 'Q: verify second notes tree' '
19801991

19811992
echo "$note1b_data" >expect
19821993
test_expect_success 'Q: verify second note for first commit' '
1983-
git cat-file blob refs/notes/foobar^:$commit1 >actual && test_cmp expect actual
1994+
git cat-file blob refs/notes/foobar^:$commit1 >actual &&
1995+
test_cmp expect actual
19841996
'
19851997

19861998
echo "$note2_data" >expect
19871999
test_expect_success 'Q: verify first note for second commit' '
1988-
git cat-file blob refs/notes/foobar^:$commit2 >actual && test_cmp expect actual
2000+
git cat-file blob refs/notes/foobar^:$commit2 >actual &&
2001+
test_cmp expect actual
19892002
'
19902003

19912004
echo "$note3_data" >expect
19922005
test_expect_success 'Q: verify first note for third commit' '
1993-
git cat-file blob refs/notes/foobar^:$commit3 >actual && test_cmp expect actual
2006+
git cat-file blob refs/notes/foobar^:$commit3 >actual &&
2007+
test_cmp expect actual
19942008
'
19952009

19962010
cat >expect <<EOF
@@ -2015,7 +2029,8 @@ test_expect_success 'Q: verify third notes tree' '
20152029

20162030
echo "$note1c_data" >expect
20172031
test_expect_success 'Q: verify third note for first commit' '
2018-
git cat-file blob refs/notes/foobar2:$commit1 >actual && test_cmp expect actual
2032+
git cat-file blob refs/notes/foobar2:$commit1 >actual &&
2033+
test_cmp expect actual
20192034
'
20202035

20212036
cat >expect <<EOF
@@ -2041,7 +2056,8 @@ test_expect_success 'Q: verify fourth notes tree' '
20412056

20422057
echo "$note2b_data" >expect
20432058
test_expect_success 'Q: verify second note for second commit' '
2044-
git cat-file blob refs/notes/foobar:$commit2 >actual && test_cmp expect actual
2059+
git cat-file blob refs/notes/foobar:$commit2 >actual &&
2060+
test_cmp expect actual
20452061
'
20462062

20472063
cat >input <<EOF

0 commit comments

Comments
 (0)