File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ test_description='git shortlog
9
9
. ./test-lib.sh
10
10
11
11
test_expect_success ' setup' '
12
+ test_tick &&
12
13
echo 1 >a1 &&
13
14
git add a1 &&
14
15
tree=$(git write-tree) &&
@@ -59,7 +60,7 @@ fuzz() {
59
60
file=$1 &&
60
61
sed "
61
62
s/$_x40 /OBJECT_NAME/g
62
- s/$_x05 /OBJID/g
63
+ s/$_x35 /OBJID/g
63
64
s/^ \{6\}[CTa].*/ SUBJECT/g
64
65
s/^ \{8\}[^ ].*/ CONTINUATION/g
65
66
" < " $file " > " $file .fuzzy" &&
@@ -81,7 +82,7 @@ test_expect_success 'pretty format' '
81
82
82
83
test_expect_success ' --abbrev' '
83
84
sed s/SUBJECT/OBJID/ expect.template >expect &&
84
- git shortlog --format="%h" --abbrev=5 HEAD >log &&
85
+ git shortlog --format="%h" --abbrev=35 HEAD >log &&
85
86
fuzz log >log.predictable &&
86
87
test_cmp expect log.predictable
87
88
'
Original file line number Diff line number Diff line change @@ -175,9 +175,10 @@ esac
175
175
176
176
# Convenience
177
177
#
178
- # A regexp to match 5 and 40 hexdigits
178
+ # A regexp to match 5, 35 and 40 hexdigits
179
179
_x05=' [0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
180
- _x40=" $_x05$_x05$_x05$_x05$_x05$_x05$_x05$_x05 "
180
+ _x35=" $_x05$_x05$_x05$_x05$_x05$_x05$_x05 "
181
+ _x40=" $_x35$_x05 "
181
182
182
183
# Zero SHA-1
183
184
_z40=0000000000000000000000000000000000000000
193
194
# when case-folding filenames
194
195
u200c=$( printf ' \342\200\214' )
195
196
196
- export _x05 _x40 _z40 LF u200c EMPTY_TREE EMPTY_BLOB
197
+ export _x05 _x35 _x40 _z40 LF u200c EMPTY_TREE EMPTY_BLOB
197
198
198
199
# Each test should start with something like this, after copyright notices:
199
200
#
You can’t perform that action at this time.
0 commit comments