File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ test_description='git shortlog
99. ./test-lib.sh
1010
1111test_expect_success ' setup' '
12+ test_tick &&
1213 echo 1 >a1 &&
1314 git add a1 &&
1415 tree=$(git write-tree) &&
@@ -59,7 +60,7 @@ fuzz() {
5960 file=$1 &&
6061 sed "
6162 s/$_x40 /OBJECT_NAME/g
62- s/$_x05 /OBJID/g
63+ s/$_x35 /OBJID/g
6364 s/^ \{6\}[CTa].*/ SUBJECT/g
6465 s/^ \{8\}[^ ].*/ CONTINUATION/g
6566 " < " $file " > " $file .fuzzy" &&
@@ -81,7 +82,7 @@ test_expect_success 'pretty format' '
8182
8283test_expect_success ' --abbrev' '
8384 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 &&
8586 fuzz log >log.predictable &&
8687 test_cmp expect log.predictable
8788'
Original file line number Diff line number Diff line change @@ -175,9 +175,10 @@ esac
175175
176176# Convenience
177177#
178- # A regexp to match 5 and 40 hexdigits
178+ # A regexp to match 5, 35 and 40 hexdigits
179179_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 "
181182
182183# Zero SHA-1
183184_z40=0000000000000000000000000000000000000000
193194# when case-folding filenames
194195u200c=$( printf ' \342\200\214' )
195196
196- export _x05 _x40 _z40 LF u200c EMPTY_TREE EMPTY_BLOB
197+ export _x05 _x35 _x40 _z40 LF u200c EMPTY_TREE EMPTY_BLOB
197198
198199# Each test should start with something like this, after copyright notices:
199200#
You can’t perform that action at this time.
0 commit comments