t1700: change here document style

This improves test indentation by getting rid of the outdated here document style. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Christian Couder committed Feb 27, 2017 at 18:59 UTC 5662176313935abb2035a12e14d701c756d9ac96
1 file changed +85 -85
t/t1700-split-index.sh
+85 -85
@@ -19,12 +19,12 @@ test_expect_success 'enable split index' '
19 own=8299b0bcd1ac364e5f1d7768efb62fa2da79a339
20 base=39d890139ee5356c7ef572216cebcd27aa41f9df
21 fi &&
22 - cat >expect <<EOF &&
23 -own $own
24 -base $base
25 -replacements:
26 -deletions:
27 -EOF
22 + cat >expect <<-EOF &&
23 + own $own
24 + base $base
25 + replacements:
26 + deletions:
27 + EOF
28 test_cmp expect actual
29 '
30
@@ -32,51 +32,51 @@ test_expect_success 'add one file' '
32 : >one &&
33 git update-index --add one &&
34 git ls-files --stage >ls-files.actual &&
35 - cat >ls-files.expect <<EOF &&
36 -100644 $EMPTY_BLOB 0 one
37 -EOF
35 + cat >ls-files.expect <<-EOF &&
36 + 100644 $EMPTY_BLOB 0 one
37 + EOF
38 test_cmp ls-files.expect ls-files.actual &&
39
40 test-dump-split-index .git/index | sed "/^own/d" >actual &&
41 - cat >expect <<EOF &&
42 -base $base
43 -100644 $EMPTY_BLOB 0 one
44 -replacements:
45 -deletions:
46 -EOF
41 + cat >expect <<-EOF &&
42 + base $base
43 + 100644 $EMPTY_BLOB 0 one
44 + replacements:
45 + deletions:
46 + EOF
47 test_cmp expect actual
48 '
49
50 test_expect_success 'disable split index' '
51 git update-index --no-split-index &&
52 git ls-files --stage >ls-files.actual &&
53 - cat >ls-files.expect <<EOF &&
54 -100644 $EMPTY_BLOB 0 one
55 -EOF
53 + cat >ls-files.expect <<-EOF &&
54 + 100644 $EMPTY_BLOB 0 one
55 + EOF
56 test_cmp ls-files.expect ls-files.actual &&
57
58 BASE=$(test-dump-split-index .git/index | grep "^own" | sed "s/own/base/") &&
59 test-dump-split-index .git/index | sed "/^own/d" >actual &&
60 - cat >expect <<EOF &&
61 -not a split index
62 -EOF
60 + cat >expect <<-EOF &&
61 + not a split index
62 + EOF
63 test_cmp expect actual
64 '
65
66 test_expect_success 'enable split index again, "one" now belongs to base index"' '
67 git update-index --split-index &&
68 git ls-files --stage >ls-files.actual &&
69 - cat >ls-files.expect <<EOF &&
70 -100644 $EMPTY_BLOB 0 one
71 -EOF
69 + cat >ls-files.expect <<-EOF &&
70 + 100644 $EMPTY_BLOB 0 one
71 + EOF
72 test_cmp ls-files.expect ls-files.actual &&
73
74 test-dump-split-index .git/index | sed "/^own/d" >actual &&
75 - cat >expect <<EOF &&
76 -$BASE
77 -replacements:
78 -deletions:
79 -EOF
75 + cat >expect <<-EOF &&
76 + $BASE
77 + replacements:
78 + deletions:
79 + EOF
80 test_cmp expect actual
81 '
82
@@ -84,18 +84,18 @@ test_expect_success 'modify original file, base index untouched' '
84 echo modified >one &&
85 git update-index one &&
86 git ls-files --stage >ls-files.actual &&
87 - cat >ls-files.expect <<EOF &&
88 -100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0 one
89 -EOF
87 + cat >ls-files.expect <<-EOF &&
88 + 100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0 one
89 + EOF
90 test_cmp ls-files.expect ls-files.actual &&
91
92 test-dump-split-index .git/index | sed "/^own/d" >actual &&
93 - q_to_tab >expect <<EOF &&
94 -$BASE
95 -100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0Q
96 -replacements: 0
97 -deletions:
98 -EOF
93 + q_to_tab >expect <<-EOF &&
94 + $BASE
95 + 100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0Q
96 + replacements: 0
97 + deletions:
98 + EOF
99 test_cmp expect actual
100 '
101
@@ -103,54 +103,54 @@ test_expect_success 'add another file, which stays index' '
103 : >two &&
104 git update-index --add two &&
105 git ls-files --stage >ls-files.actual &&
106 - cat >ls-files.expect <<EOF &&
107 -100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0 one
108 -100644 $EMPTY_BLOB 0 two
109 -EOF
106 + cat >ls-files.expect <<-EOF &&
107 + 100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0 one
108 + 100644 $EMPTY_BLOB 0 two
109 + EOF
110 test_cmp ls-files.expect ls-files.actual &&
111
112 test-dump-split-index .git/index | sed "/^own/d" >actual &&
113 - q_to_tab >expect <<EOF &&
114 -$BASE
115 -100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0Q
116 -100644 $EMPTY_BLOB 0 two
117 -replacements: 0
118 -deletions:
119 -EOF
113 + q_to_tab >expect <<-EOF &&
114 + $BASE
115 + 100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0Q
116 + 100644 $EMPTY_BLOB 0 two
117 + replacements: 0
118 + deletions:
119 + EOF
120 test_cmp expect actual
121 '
122
123 test_expect_success 'remove file not in base index' '
124 git update-index --force-remove two &&
125 git ls-files --stage >ls-files.actual &&
126 - cat >ls-files.expect <<EOF &&
127 -100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0 one
128 -EOF
126 + cat >ls-files.expect <<-EOF &&
127 + 100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0 one
128 + EOF
129 test_cmp ls-files.expect ls-files.actual &&
130
131 test-dump-split-index .git/index | sed "/^own/d" >actual &&
132 - q_to_tab >expect <<EOF &&
133 -$BASE
134 -100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0Q
135 -replacements: 0
136 -deletions:
137 -EOF
132 + q_to_tab >expect <<-EOF &&
133 + $BASE
134 + 100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0Q
135 + replacements: 0
136 + deletions:
137 + EOF
138 test_cmp expect actual
139 '
140
141 test_expect_success 'remove file in base index' '
142 git update-index --force-remove one &&
143 git ls-files --stage >ls-files.actual &&
144 - cat >ls-files.expect <<EOF &&
145 -EOF
144 + cat >ls-files.expect <<-EOF &&
145 + EOF
146 test_cmp ls-files.expect ls-files.actual &&
147
148 test-dump-split-index .git/index | sed "/^own/d" >actual &&
149 - cat >expect <<EOF &&
150 -$BASE
151 -replacements:
152 -deletions: 0
153 -EOF
149 + cat >expect <<-EOF &&
150 + $BASE
151 + replacements:
152 + deletions: 0
153 + EOF
154 test_cmp expect actual
155 '
156
@@ -158,18 +158,18 @@ test_expect_success 'add original file back' '
158 : >one &&
159 git update-index --add one &&
160 git ls-files --stage >ls-files.actual &&
161 - cat >ls-files.expect <<EOF &&
162 -100644 $EMPTY_BLOB 0 one
163 -EOF
161 + cat >ls-files.expect <<-EOF &&
162 + 100644 $EMPTY_BLOB 0 one
163 + EOF
164 test_cmp ls-files.expect ls-files.actual &&
165
166 test-dump-split-index .git/index | sed "/^own/d" >actual &&
167 - cat >expect <<EOF &&
168 -$BASE
169 -100644 $EMPTY_BLOB 0 one
170 -replacements:
171 -deletions: 0
172 -EOF
167 + cat >expect <<-EOF &&
168 + $BASE
169 + 100644 $EMPTY_BLOB 0 one
170 + replacements:
171 + deletions: 0
172 + EOF
173 test_cmp expect actual
174 '
175
@@ -177,26 +177,26 @@ test_expect_success 'add new file' '
177 : >two &&
178 git update-index --add two &&
179 git ls-files --stage >actual &&
180 - cat >expect <<EOF &&
181 -100644 $EMPTY_BLOB 0 one
182 -100644 $EMPTY_BLOB 0 two
183 -EOF
180 + cat >expect <<-EOF &&
181 + 100644 $EMPTY_BLOB 0 one
182 + 100644 $EMPTY_BLOB 0 two
183 + EOF
184 test_cmp expect actual
185 '
186
187 test_expect_success 'unify index, two files remain' '
188 git update-index --no-split-index &&
189 git ls-files --stage >ls-files.actual &&
190 - cat >ls-files.expect <<EOF &&
191 -100644 $EMPTY_BLOB 0 one
192 -100644 $EMPTY_BLOB 0 two
193 -EOF
190 + cat >ls-files.expect <<-EOF &&
191 + 100644 $EMPTY_BLOB 0 one
192 + 100644 $EMPTY_BLOB 0 two
193 + EOF
194 test_cmp ls-files.expect ls-files.actual &&
195
196 test-dump-split-index .git/index | sed "/^own/d" >actual &&
197 - cat >expect <<EOF &&
198 -not a split index
199 -EOF
197 + cat >expect <<-EOF &&
198 + not a split index
199 + EOF
200 test_cmp expect actual
201 '
202