@@ -8,88 +8,98 @@ test_description='test transitive info/alternate entries'
8
8
9
9
base_dir=$( pwd)
10
10
11
- test_expect_success ' preparing first repository' \
12
- ' test_create_repo A && cd A &&
13
- echo "Hello World" > file1 &&
14
- git add file1 &&
15
- git commit -m "Initial commit" file1 &&
16
- git repack -a -d &&
17
- git prune'
11
+ test_expect_success ' preparing first repository' '
12
+ test_create_repo A &&
13
+ cd A &&
14
+ echo "Hello World" > file1 &&
15
+ git add file1 &&
16
+ git commit -m "Initial commit" file1 &&
17
+ git repack -a -d &&
18
+ git prune
19
+ '
18
20
19
21
cd " $base_dir "
20
22
21
- test_expect_success ' preparing second repository' \
22
- ' git clone -l -s A B && cd B &&
23
- echo "foo bar" > file2 &&
24
- git add file2 &&
25
- git commit -m "next commit" file2 &&
26
- git repack -a -d -l &&
27
- git prune'
23
+ test_expect_success ' preparing second repository' '
24
+ git clone -l -s A B &&
25
+ cd B &&
26
+ echo "foo bar" > file2 &&
27
+ git add file2 &&
28
+ git commit -m "next commit" file2 &&
29
+ git repack -a -d -l &&
30
+ git prune
31
+ '
28
32
29
33
cd " $base_dir "
30
34
31
- test_expect_success ' preparing third repository' \
32
- ' git clone -l -s B C && cd C &&
33
- echo "Goodbye, cruel world" > file3 &&
34
- git add file3 &&
35
- git commit -m "one more" file3 &&
36
- git repack -a -d -l &&
37
- git prune'
35
+ test_expect_success ' preparing third repository' '
36
+ git clone -l -s B C &&
37
+ cd C &&
38
+ echo "Goodbye, cruel world" > file3 &&
39
+ git add file3 &&
40
+ git commit -m "one more" file3 &&
41
+ git repack -a -d -l &&
42
+ git prune
43
+ '
38
44
39
45
cd " $base_dir "
40
46
41
- test_expect_success ' creating too deep nesting' \
42
- ' git clone -l -s C D &&
43
- git clone -l -s D E &&
44
- git clone -l -s E F &&
45
- git clone -l -s F G &&
46
- git clone --bare -l -s G H'
47
+ test_expect_success ' creating too deep nesting' '
48
+ git clone -l -s C D &&
49
+ git clone -l -s D E &&
50
+ git clone -l -s E F &&
51
+ git clone -l -s F G &&
52
+ git clone --bare -l -s G H
53
+ '
47
54
48
- test_expect_success ' invalidity of deepest repository' \
49
- ' cd H &&
50
- test_must_fail git fsck
55
+ test_expect_success ' invalidity of deepest repository' '
56
+ cd H &&
57
+ test_must_fail git fsck
51
58
'
52
59
53
60
cd " $base_dir "
54
61
55
- test_expect_success ' validity of third repository' \
56
- ' cd C &&
57
- git fsck'
62
+ test_expect_success ' validity of third repository' '
63
+ cd C &&
64
+ git fsck
65
+ '
58
66
59
67
cd " $base_dir "
60
68
61
- test_expect_success ' validity of fourth repository' \
62
- ' cd D &&
63
- git fsck'
69
+ test_expect_success ' validity of fourth repository' '
70
+ cd D &&
71
+ git fsck
72
+ '
64
73
65
74
cd " $base_dir "
66
75
67
- test_expect_success ' breaking of loops' \
68
- ' echo "$base_dir"/B/.git/objects >> "$base_dir"/A/.git/objects/info/alternates&&
69
- cd C &&
70
- git fsck'
76
+ test_expect_success ' breaking of loops' '
77
+ echo "$base_dir"/B/.git/objects >>"$base_dir"/A/.git/objects/info/alternatesi &&
78
+ cd C &&
79
+ git fsck
80
+ '
71
81
72
82
cd " $base_dir "
73
83
74
- test_expect_success ' that info/alternates is necessary' \
75
- ' cd C &&
76
- rm -f .git/objects/info/alternates &&
77
- test_must_fail git fsck
84
+ test_expect_success ' that info/alternates is necessary' '
85
+ cd C &&
86
+ rm -f .git/objects/info/alternates &&
87
+ test_must_fail git fsck
78
88
'
79
89
80
90
cd " $base_dir "
81
91
82
- test_expect_success ' that relative alternate is possible for current dir' \
83
- ' cd C &&
84
- echo "../../../B/.git/objects" > .git/objects/info/alternates &&
85
- git fsck'
92
+ test_expect_success ' that relative alternate is possible for current dir' '
93
+ cd C &&
94
+ echo "../../../B/.git/objects" > .git/objects/info/alternates &&
95
+ git fsck
96
+ '
86
97
87
98
cd " $base_dir "
88
99
89
- test_expect_success \
90
- ' that relative alternate is only possible for current dir' '
91
- cd D &&
92
- test_must_fail git fsck
100
+ test_expect_success ' that relative alternate is only possible for current dir' '
101
+ cd D &&
102
+ test_must_fail git fsck
93
103
'
94
104
95
105
cd " $base_dir "
0 commit comments