@@ -144,9 +144,7 @@ test_expect_success 'setup more commits' '
144
144
'
145
145
146
146
test_expect_success ' left alignment formatting' '
147
- git log --pretty="format:%<(40)%s" >actual &&
148
- # complete the incomplete line at the end
149
- echo >>actual &&
147
+ git log --pretty="tformat:%<(40)%s" >actual &&
150
148
qz_to_tab_space <<EOF >expected &&
151
149
message two Z
152
150
message one Z
157
155
'
158
156
159
157
test_expect_success ' left alignment formatting at the nth column' '
160
- git log --pretty="format:%h %<|(40)%s" >actual &&
161
- # complete the incomplete line at the end
162
- echo >>actual &&
158
+ git log --pretty="tformat:%h %<|(40)%s" >actual &&
163
159
qz_to_tab_space <<EOF >expected &&
164
160
$head1 message two Z
165
161
$head2 message one Z
170
166
'
171
167
172
168
test_expect_success ' left alignment formatting with no padding' '
173
- git log --pretty="format:%<(1)%s" >actual &&
174
- # complete the incomplete line at the end
175
- echo >>actual &&
169
+ git log --pretty="tformat:%<(1)%s" >actual &&
176
170
cat <<EOF >expected &&
177
171
message two
178
172
message one
183
177
'
184
178
185
179
test_expect_success ' left alignment formatting with trunc' '
186
- git log --pretty="format:%<(10,trunc)%s" >actual &&
187
- # complete the incomplete line at the end
188
- echo >>actual &&
180
+ git log --pretty="tformat:%<(10,trunc)%s" >actual &&
189
181
qz_to_tab_space <<EOF >expected &&
190
182
message ..
191
183
message ..
196
188
'
197
189
198
190
test_expect_success ' left alignment formatting with ltrunc' '
199
- git log --pretty="format:%<(10,ltrunc)%s" >actual &&
200
- # complete the incomplete line at the end
201
- echo >>actual &&
191
+ git log --pretty="tformat:%<(10,ltrunc)%s" >actual &&
202
192
qz_to_tab_space <<EOF >expected &&
203
193
..sage two
204
194
..sage one
209
199
'
210
200
211
201
test_expect_success ' left alignment formatting with mtrunc' '
212
- git log --pretty="format:%<(10,mtrunc)%s" >actual &&
213
- # complete the incomplete line at the end
214
- echo >>actual &&
202
+ git log --pretty="tformat:%<(10,mtrunc)%s" >actual &&
215
203
qz_to_tab_space <<EOF >expected &&
216
204
mess.. two
217
205
mess.. one
222
210
'
223
211
224
212
test_expect_success ' right alignment formatting' '
225
- git log --pretty="format:%>(40)%s" >actual &&
226
- # complete the incomplete line at the end
227
- echo >>actual &&
213
+ git log --pretty="tformat:%>(40)%s" >actual &&
228
214
qz_to_tab_space <<EOF >expected &&
229
215
Z message two
230
216
Z message one
235
221
'
236
222
237
223
test_expect_success ' right alignment formatting at the nth column' '
238
- git log --pretty="format:%h %>|(40)%s" >actual &&
239
- # complete the incomplete line at the end
240
- echo >>actual &&
224
+ git log --pretty="tformat:%h %>|(40)%s" >actual &&
241
225
qz_to_tab_space <<EOF >expected &&
242
226
$head1 message two
243
227
$head2 message one
248
232
'
249
233
250
234
test_expect_success ' right alignment formatting with no padding' '
251
- git log --pretty="format:%>(1)%s" >actual &&
252
- # complete the incomplete line at the end
253
- echo >>actual &&
235
+ git log --pretty="tformat:%>(1)%s" >actual &&
254
236
cat <<EOF >expected &&
255
237
message two
256
238
message one
261
243
'
262
244
263
245
test_expect_success ' center alignment formatting' '
264
- git log --pretty="format:%><(40)%s" >actual &&
265
- # complete the incomplete line at the end
266
- echo >>actual &&
246
+ git log --pretty="tformat:%><(40)%s" >actual &&
267
247
qz_to_tab_space <<EOF >expected &&
268
248
Z message two Z
269
249
Z message one Z
274
254
'
275
255
276
256
test_expect_success ' center alignment formatting at the nth column' '
277
- git log --pretty="format:%h %><|(40)%s" >actual &&
278
- # complete the incomplete line at the end
279
- echo >>actual &&
257
+ git log --pretty="tformat:%h %><|(40)%s" >actual &&
280
258
qz_to_tab_space <<EOF >expected &&
281
259
$head1 message two Z
282
260
$head2 message one Z
287
265
'
288
266
289
267
test_expect_success ' center alignment formatting with no padding' '
290
- git log --pretty="format:%><(1)%s" >actual &&
291
- # complete the incomplete line at the end
292
- echo >>actual &&
268
+ git log --pretty="tformat:%><(1)%s" >actual &&
293
269
cat <<EOF >expected &&
294
270
message two
295
271
message one
@@ -305,9 +281,7 @@ old_head1=$(git rev-parse --verify HEAD~0)
305
281
306
282
test_expect_success ' left/right alignment formatting with stealing' '
307
283
git commit --amend -m short --author "long long long <[email protected] >" &&
308
- git log --pretty="format:%<(10,trunc)%s%>>(10,ltrunc)% an" >actual &&
309
- # complete the incomplete line at the end
310
- echo >>actual &&
284
+ git log --pretty="tformat:%<(10,trunc)%s%>>(10,ltrunc)% an" >actual &&
311
285
cat <<EOF >expected &&
312
286
short long long long
313
287
message .. A U Thor
0 commit comments