]> git.ipfire.org Git - thirdparty/git.git/blobdiff - hash.h
hash: add a function to lookup hash algorithm by length
[thirdparty/git.git] / hash.h
diff --git a/hash.h b/hash.h
index adde708cf26d90ffd7ae10e6cdb8bfd7c08b1db5..661c9f228128c2036fa4c5c238f2e35f9a42f13b 100644 (file)
--- a/hash.h
+++ b/hash.h
@@ -131,6 +131,8 @@ extern const struct git_hash_algo hash_algos[GIT_HASH_NALGOS];
 int hash_algo_by_name(const char *name);
 /* Identical, except based on the format ID. */
 int hash_algo_by_id(uint32_t format_id);
+/* Identical, except based on the length. */
+int hash_algo_by_length(int len);
 /* Identical, except for a pointer to struct git_hash_algo. */
 static inline int hash_algo_by_ptr(const struct git_hash_algo *p)
 {