@@ -101,7 +101,11 @@ test_expect_failure 'NUL termination with --stat' '
101
101
102
102
test_expect_success ' setup more commits' '
103
103
test_commit "message one" one one message-one &&
104
- test_commit "message two" two two message-two
104
+ test_commit "message two" two two message-two &&
105
+ head1=$(git rev-parse --verify --short HEAD~0) &&
106
+ head2=$(git rev-parse --verify --short HEAD~1) &&
107
+ head3=$(git rev-parse --verify --short HEAD~2) &&
108
+ head4=$(git rev-parse --verify --short HEAD~3)
105
109
'
106
110
107
111
test_expect_success ' left alignment formatting' '
@@ -117,18 +121,18 @@ EOF
117
121
test_cmp expected actual
118
122
'
119
123
120
- test_expect_success ' left alignment formatting at the nth column' '
121
- git log --pretty=" format:%h %<|(40)%s" >actual &&
124
+ test_expect_success ' left alignment formatting at the nth column' "
125
+ git log --pretty=' format:%h %<|(40)%s' >actual &&
122
126
# complete the incomplete line at the end
123
127
echo >>actual &&
124
128
qz_to_tab_space <<\EOF >expected &&
125
- fa33ab1 message two Z
126
- 7cd6c63 message one Z
127
- 1711bf9 add bar Z
128
- af20c06 initial Z
129
+ $head1 message two Z
130
+ $head2 message one Z
131
+ $head3 add bar Z
132
+ $head4 initial Z
129
133
EOF
130
134
test_cmp expected actual
131
- '
135
+ "
132
136
133
137
test_expect_success ' left alignment formatting with no padding' '
134
138
git log --pretty="format:%<(1)%s" >actual &&
@@ -195,18 +199,18 @@ EOF
195
199
test_cmp expected actual
196
200
'
197
201
198
- test_expect_success ' right alignment formatting at the nth column' '
199
- git log --pretty=" format:%h %>|(40)%s" >actual &&
202
+ test_expect_success ' right alignment formatting at the nth column' "
203
+ git log --pretty=' format:%h %>|(40)%s' >actual &&
200
204
# complete the incomplete line at the end
201
205
echo >>actual &&
202
206
qz_to_tab_space <<\EOF >expected &&
203
- fa33ab1 message two
204
- 7cd6c63 message one
205
- 1711bf9 add bar
206
- af20c06 initial
207
+ $head1 message two
208
+ $head2 message one
209
+ $head3 add bar
210
+ $head4 initial
207
211
EOF
208
212
test_cmp expected actual
209
- '
213
+ "
210
214
211
215
test_expect_success ' right alignment formatting with no padding' '
212
216
git log --pretty="format:%>(1)%s" >actual &&
@@ -234,18 +238,18 @@ EOF
234
238
test_cmp expected actual
235
239
'
236
240
237
- test_expect_success ' center alignment formatting at the nth column' '
238
- git log --pretty=" format:%h %><|(40)%s" >actual &&
241
+ test_expect_success ' center alignment formatting at the nth column' "
242
+ git log --pretty=' format:%h %><|(40)%s' >actual &&
239
243
# complete the incomplete line at the end
240
244
echo >>actual &&
241
245
qz_to_tab_space <<\EOF >expected &&
242
- fa33ab1 message two Z
243
- 7cd6c63 message one Z
244
- 1711bf9 add bar Z
245
- af20c06 initial Z
246
+ $head1 message two Z
247
+ $head2 message one Z
248
+ $head3 add bar Z
249
+ $head4 initial Z
246
250
EOF
247
251
test_cmp expected actual
248
- '
252
+ "
249
253
250
254
test_expect_success ' center alignment formatting with no padding' '
251
255
git log --pretty="format:%><(1)%s" >actual &&
0 commit comments