@@ -20,12 +20,13 @@ setdate_and_increment () {
20
20
export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
21
21
}
22
22
23
- test_expect_success setup '
24
- test_oid_cache <<-EOF &&
25
- disklen sha1:138
26
- disklen sha256:154
27
- EOF
23
+ test_object_file_size () {
24
+ oid= $( git rev-parse " $1 " )
25
+ path= " .git/objects/ $( test_oid_to_path $oid ) "
26
+ test_file_size " $path "
27
+ }
28
28
29
+ test_expect_success setup '
29
30
# setup .mailmap
30
31
cat >.mailmap <<-EOF &&
31
32
@@ -94,7 +95,6 @@ test_atom () {
94
95
}
95
96
96
97
hexlen=$( test_oid hexsz)
97
- disklen=$( test_oid disklen)
98
98
99
99
test_atom head refname refs/heads/main
100
100
test_atom head refname: refs/heads/main
@@ -129,7 +129,7 @@ test_atom head push:strip=1 remotes/myfork/main
129
129
test_atom head push:strip=-1 main
130
130
test_atom head objecttype commit
131
131
test_atom head objectsize $(( 131 + hexlen))
132
- test_atom head objectsize:disk $disklen
132
+ test_atom head objectsize:disk $( test_object_file_size refs/heads/main )
133
133
test_atom head deltabase $ZERO_OID
134
134
test_atom head objectname $( git rev-parse refs/heads/main)
135
135
test_atom head objectname:short $( git rev-parse --short refs/heads/main)
@@ -203,8 +203,8 @@ test_atom tag upstream ''
203
203
test_atom tag push ' '
204
204
test_atom tag objecttype tag
205
205
test_atom tag objectsize $(( 114 + hexlen))
206
- test_atom tag objectsize:disk $disklen
207
- test_atom tag ' *objectsize:disk' $disklen
206
+ test_atom tag objectsize:disk $( test_object_file_size refs/tags/testtag )
207
+ test_atom tag ' *objectsize:disk' $( test_object_file_size refs/heads/main )
208
208
test_atom tag deltabase $ZERO_OID
209
209
test_atom tag ' *deltabase' $ZERO_OID
210
210
test_atom tag objectname $( git rev-parse refs/tags/testtag)
0 commit comments