@@ -81,8 +81,7 @@ test_auto_squash () {
81
81
echo 1 > file1 &&
82
82
git add -u &&
83
83
test_tick &&
84
- git commit -m " squash! first" &&
85
-
84
+ git commit -m " squash! first" -m " extra para for first" &&
86
85
git tag $1 &&
87
86
test_tick &&
88
87
git rebase $2 -i HEAD^^^ &&
@@ -139,7 +138,7 @@ test_expect_success 'auto squash that matches 2 commits' '
139
138
echo 1 >file1 &&
140
139
git add -u &&
141
140
test_tick &&
142
- git commit -m "squash! first" &&
141
+ git commit -m "squash! first" -m "extra para for first" &&
143
142
git tag final-multisquash &&
144
143
test_tick &&
145
144
git rebase --autosquash -i HEAD~4 &&
@@ -192,7 +191,7 @@ test_expect_success 'auto squash that matches a sha1' '
192
191
git add -u &&
193
192
test_tick &&
194
193
oid=$(git rev-parse --short HEAD^) &&
195
- git commit -m "squash! $oid" &&
194
+ git commit -m "squash! $oid" -m "extra para" &&
196
195
git tag final-shasquash &&
197
196
test_tick &&
198
197
git rebase --autosquash -i HEAD^^^ &&
@@ -203,7 +202,8 @@ test_expect_success 'auto squash that matches a sha1' '
203
202
git cat-file blob HEAD^:file1 >actual &&
204
203
test_cmp expect actual &&
205
204
git cat-file commit HEAD^ >commit &&
206
- grep squash commit >actual &&
205
+ ! grep "squash" commit &&
206
+ grep "^extra para" commit >actual &&
207
207
test_line_count = 1 actual
208
208
'
209
209
@@ -213,7 +213,7 @@ test_expect_success 'auto squash that matches longer sha1' '
213
213
git add -u &&
214
214
test_tick &&
215
215
oid=$(git rev-parse --short=11 HEAD^) &&
216
- git commit -m "squash! $oid" &&
216
+ git commit -m "squash! $oid" -m "extra para" &&
217
217
git tag final-longshasquash &&
218
218
test_tick &&
219
219
git rebase --autosquash -i HEAD^^^ &&
@@ -224,7 +224,8 @@ test_expect_success 'auto squash that matches longer sha1' '
224
224
git cat-file blob HEAD^:file1 >actual &&
225
225
test_cmp expect actual &&
226
226
git cat-file commit HEAD^ >commit &&
227
- grep squash commit >actual &&
227
+ ! grep "squash" commit &&
228
+ grep "^extra para" commit >actual &&
228
229
test_line_count = 1 actual
229
230
'
230
231
@@ -233,7 +234,7 @@ test_auto_commit_flags () {
233
234
echo 1 > file1 &&
234
235
git add -u &&
235
236
test_tick &&
236
- git commit --$1 first-commit &&
237
+ git commit --$1 first-commit -m " extra para for first " &&
237
238
git tag final-commit-$1 &&
238
239
test_tick &&
239
240
git rebase --autosquash -i HEAD^^^ &&
@@ -261,11 +262,11 @@ test_auto_fixup_fixup () {
261
262
echo 1 > file1 &&
262
263
git add -u &&
263
264
test_tick &&
264
- git commit -m " $1 ! first" &&
265
+ git commit -m " $1 ! first" -m " extra para for first " &&
265
266
echo 2 > file1 &&
266
267
git add -u &&
267
268
test_tick &&
268
- git commit -m " $1 ! $2 ! first" &&
269
+ git commit -m " $1 ! $2 ! first" -m " second extra para for first " &&
269
270
git tag " final-$1 -$2 " &&
270
271
test_tick &&
271
272
(
@@ -326,12 +327,12 @@ test_expect_success C_LOCALE_OUTPUT 'autosquash with custom inst format' '
326
327
git add -u &&
327
328
test_tick &&
328
329
oid=$(git rev-parse --short HEAD^) &&
329
- git commit -m "squash! $oid" &&
330
+ git commit -m "squash! $oid" -m "extra para for first" &&
330
331
echo 1 >file1 &&
331
332
git add -u &&
332
333
test_tick &&
333
334
subject=$(git log -n 1 --format=%s HEAD~2) &&
334
- git commit -m "squash! $subject" &&
335
+ git commit -m "squash! $subject" -m "second extra para for first" &&
335
336
git tag final-squash-instFmt &&
336
337
test_tick &&
337
338
git rebase --autosquash -i HEAD~4 &&
@@ -342,8 +343,9 @@ test_expect_success C_LOCALE_OUTPUT 'autosquash with custom inst format' '
342
343
git cat-file blob HEAD^:file1 >actual &&
343
344
test_cmp expect actual &&
344
345
git cat-file commit HEAD^ >commit &&
345
- grep squash commit >actual &&
346
- test_line_count = 2 actual
346
+ ! grep "squash" commit &&
347
+ grep first commit >actual &&
348
+ test_line_count = 3 actual
347
349
'
348
350
349
351
test_expect_success ' autosquash with empty custom instructionFormat' '
0 commit comments