]> git.ipfire.org Git - thirdparty/git.git/commit
t9350: make hash size independent
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 29 Jul 2020 23:14:13 +0000 (23:14 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2020 16:16:48 +0000 (09:16 -0700)
commit831279d3c18694e69a594767b7cc6a88af987cde
tree22256e202a6d1a77daa711019f932e1295dd3ee3
parentb6e50052ac60254f423762e8a4f6192400130455
t9350: make hash size independent

This test checks for several commit object sizes to verify that objects
are encoded as expected. However, the size of a commit object differs
between SHA-1 and SHA-256, since each contains a hex representation of
the tree's object ID. Since these are root commits, compute the size of
each commit by using a constant plus the size of a single hex object ID.

In addition, use $ZERO_OID instead of a hard-coded object ID.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9350-fast-export.sh