From: brian m. carlson Date: Wed, 14 Nov 2018 04:09:29 +0000 (+0000) Subject: hex: introduce functions to print arbitrary hashes X-Git-Tag: v2.21.0-rc0~65^2~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/47edb649973cf5cd5f7066b5c936b330f78d687b?hp=47edb649973cf5cd5f7066b5c936b330f78d687b hex: introduce functions to print arbitrary hashes Currently, we have functions that turn an arbitrary SHA-1 value or an object ID into hex format, either using a static buffer or with a user-provided buffer. Add variants of these functions that can handle an arbitrary hash algorithm, specified by constant. Update the documentation as well. While we're at it, remove the "extern" declaration from this family of functions, since it's not needed and our style now recommends against it. We use the variant taking the algorithm structure pointer as the internal variant, since taking an algorithm pointer is the easiest way to handle all of the variants in use. Note that we maintain these functions because there are hashes which must change based on the hash algorithm in use but are not object IDs (such as pack checksums). Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano ---