@@ -76,8 +76,8 @@ head3=$(
7676)
7777
7878test_expect_success ' modified submodule(backward)' "
79- git submodule summary >actual &&
80- cat >expected <<-EOF &&
79+ git submodule summary >actual &&
80+ cat >expected <<-EOF &&
8181* sm1 $head2 ...$head3 (2):
8282 < Add foo3
8383 < Add foo2
8989head4=$( add_file sm1 foo4 foo5) &&
9090head4_full=$( GIT_DIR=sm1/.git git rev-parse --verify HEAD)
9191test_expect_success ' modified submodule(backward and forward)' "
92- git submodule summary >actual &&
93- cat >expected <<-EOF &&
92+ git submodule summary >actual &&
93+ cat >expected <<-EOF &&
9494* sm1 $head2 ...$head4 (4):
9595 > Add foo5
9696 > Add foo4
@@ -102,15 +102,15 @@ EOF
102102"
103103
104104test_expect_success ' --summary-limit' "
105- git submodule summary -n 3 >actual &&
106- cat >expected <<-EOF &&
105+ git submodule summary -n 3 >actual &&
106+ cat >expected <<-EOF &&
107107* sm1 $head2 ...$head4 (4):
108108 > Add foo5
109109 > Add foo4
110110 < Add foo3
111111
112112EOF
113- test_cmp expected actual
113+ test_cmp expected actual
114114"
115115
116116commit_file sm1 &&
@@ -122,8 +122,8 @@ rm -f sm1 &&
122122mv sm1-bak sm1
123123
124124test_expect_success ' typechanged submodule(submodule->blob), --cached' "
125- git submodule summary --cached >actual &&
126- cat >expected <<-EOF &&
125+ git submodule summary --cached >actual &&
126+ cat >expected <<-EOF &&
127127* sm1 $head4 (submodule)->$head5 (blob) (3):
128128 < Add foo5
129129
@@ -132,103 +132,103 @@ EOF
132132"
133133
134134test_expect_success ' typechanged submodule(submodule->blob), --files' "
135- git submodule summary --files >actual &&
136- cat >expected <<-EOF &&
135+ git submodule summary --files >actual &&
136+ cat >expected <<-EOF &&
137137* sm1 $head5 (blob)->$head4 (submodule) (3):
138138 > Add foo5
139139
140140EOF
141- test_i18ncmp actual expected
141+ test_i18ncmp actual expected
142142"
143143
144144rm -rf sm1 &&
145145git checkout-index sm1
146146test_expect_success ' typechanged submodule(submodule->blob)' "
147- git submodule summary >actual &&
148- cat >expected <<-EOF &&
147+ git submodule summary >actual &&
148+ cat >expected <<-EOF &&
149149* sm1 $head4 (submodule)->$head5 (blob):
150150
151151EOF
152- test_i18ncmp actual expected
152+ test_i18ncmp actual expected
153153"
154154
155155rm -f sm1 &&
156156test_create_repo sm1 &&
157157head6=$( add_file sm1 foo6 foo7)
158158test_expect_success ' nonexistent commit' "
159- git submodule summary >actual &&
160- cat >expected <<-EOF &&
159+ git submodule summary >actual &&
160+ cat >expected <<-EOF &&
161161* sm1 $head4 ...$head6 :
162162 Warn: sm1 doesn't contain commit $head4_full
163163
164164EOF
165- test_i18ncmp actual expected
165+ test_i18ncmp actual expected
166166"
167167
168168commit_file
169169test_expect_success ' typechanged submodule(blob->submodule)' "
170- git submodule summary >actual &&
171- cat >expected <<-EOF &&
170+ git submodule summary >actual &&
171+ cat >expected <<-EOF &&
172172* sm1 $head5 (blob)->$head6 (submodule) (2):
173173 > Add foo7
174174
175175EOF
176- test_i18ncmp expected actual
176+ test_i18ncmp expected actual
177177"
178178
179179commit_file sm1 &&
180180rm -rf sm1
181181test_expect_success ' deleted submodule' "
182- git submodule summary >actual &&
183- cat >expected <<-EOF &&
182+ git submodule summary >actual &&
183+ cat >expected <<-EOF &&
184184* sm1 $head6 ...0000000:
185185
186186EOF
187- test_cmp expected actual
187+ test_cmp expected actual
188188"
189189
190190test_create_repo sm2 &&
191191head7=$( add_file sm2 foo8 foo9) &&
192192git add sm2
193193
194194test_expect_success ' multiple submodules' "
195- git submodule summary >actual &&
196- cat >expected <<-EOF &&
195+ git submodule summary >actual &&
196+ cat >expected <<-EOF &&
197197* sm1 $head6 ...0000000:
198198
199199* sm2 0000000...$head7 (2):
200200 > Add foo9
201201
202202EOF
203- test_cmp expected actual
203+ test_cmp expected actual
204204"
205205
206206test_expect_success ' path filter' "
207- git submodule summary sm2 >actual &&
208- cat >expected <<-EOF &&
207+ git submodule summary sm2 >actual &&
208+ cat >expected <<-EOF &&
209209* sm2 0000000...$head7 (2):
210210 > Add foo9
211211
212212EOF
213- test_cmp expected actual
213+ test_cmp expected actual
214214"
215215
216216commit_file sm2
217217test_expect_success ' given commit' "
218- git submodule summary HEAD^ >actual &&
219- cat >expected <<-EOF &&
218+ git submodule summary HEAD^ >actual &&
219+ cat >expected <<-EOF &&
220220* sm1 $head6 ...0000000:
221221
222222* sm2 0000000...$head7 (2):
223223 > Add foo9
224224
225225EOF
226- test_cmp expected actual
226+ test_cmp expected actual
227227"
228228
229229test_expect_success ' --for-status' "
230- git submodule summary --for-status HEAD^ >actual &&
231- test_i18ncmp actual - <<EOF
230+ git submodule summary --for-status HEAD^ >actual &&
231+ test_i18ncmp actual - <<EOF
232232# Submodule changes to be committed:
233233#
234234# * sm1 $head6 ...0000000:
@@ -240,14 +240,14 @@ EOF
240240"
241241
242242test_expect_success ' fail when using --files together with --cached' "
243- test_must_fail git submodule summary --files --cached
243+ test_must_fail git submodule summary --files --cached
244244"
245245
246246test_expect_success ' should not fail in an empty repo' "
247- git init xyzzy &&
248- cd xyzzy &&
249- git submodule summary >output 2>&1 &&
250- test_cmp output /dev/null
247+ git init xyzzy &&
248+ cd xyzzy &&
249+ git submodule summary >output 2>&1 &&
250+ test_cmp output /dev/null
251251"
252252
253253test_done
0 commit comments