t/lib-pack: support SHA-256
authorbrian m. carlson <sandals@crustytoothpaste.net>
Fri, 7 Feb 2020 00:52:34 +0000 (00:52 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Feb 2020 19:07:29 +0000 (11:07 -0800)
commitdb12505c2c59f1e126e4bd79f80196510a7d30df
tree130c0327c4c4a2460644ffa3133066a46ca3ccf0
parentde93cc14ab7e8db7645d8dbe4fd2603f76d5851f
t/lib-pack: support SHA-256

Update the support routines for generating packs to support both SHA-1
and SHA-256.  Compute the trailing pack checksum and its length
correctly depending on the algorithm, and look up the object names based
on the algorithm as well.  Ensure we initialize the algorithm facts so
that our callers need not do so.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-pack.sh