]> git.ipfire.org Git - thirdparty/git.git/commit
hash: add a function to lookup hash algorithm by length
authorbrian m. carlson <sandals@crustytoothpaste.net>
Tue, 19 Feb 2019 00:05:17 +0000 (00:05 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Apr 2019 02:57:39 +0000 (11:57 +0900)
commit95399788d158e4628e25db20569d44af21a40906
tree4051c49eddd71f891f7961fec6b251452af31f6b
parent9c9492e8aafdcc2ec464e9261b78619b05a835f8
hash: add a function to lookup hash algorithm by length

There are some cases, such as the dumb HTTP transport and bundles, where
we can only determine the hash algorithm in use by the length of the
object IDs. Provide a function that looks up the algorithm by length.

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