]> git.ipfire.org Git - thirdparty/git.git/commit
sha1-file: provide functions to look up hash algorithms
authorbrian m. carlson <sandals@crustytoothpaste.net>
Mon, 22 Oct 2018 02:43:32 +0000 (02:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Oct 2018 03:59:08 +0000 (12:59 +0900)
commit2f90b9d9b4ba1f8e79318853301e8ef19ca02681
tree76cc6f9d74fcc6153e9e2717f75194649ed6db4e
parent1ccf07cbb762b44746c49634e1c6fb945c9977df
sha1-file: provide functions to look up hash algorithms

There are several ways we might refer to a hash algorithm: by name, such
as in the config file; by format ID, such as in a pack; or internally,
by a pointer to the hash_algos array.  Provide functions to look up hash
algorithms based on these various forms and return the internal constant
used for them.  If conversion to another form is necessary, this
internal constant can be used to look up the proper data in the
hash_algos array.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
hash.h
sha1-file.c