summaryrefslogtreecommitdiff
path: root/src/hashtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hashtable.c')
-rw-r--r--src/hashtable.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/hashtable.c b/src/hashtable.c
index 15d173992..f836f166d 100644
--- a/src/hashtable.c
+++ b/src/hashtable.c
@@ -241,3 +241,17 @@ int git_hashtable_merge(git_hashtable *self, git_hashtable *other)
return insert_nodes(self, other->nodes, other->key_count);
}
+
+/**
+ * Standard string
+ */
+uint32_t git_hash__strhash_cb(const void *key, int hash_id)
+{
+ static uint32_t hash_seeds[GIT_HASHTABLE_HASHES] = {
+ 2147483647,
+ 0x5d20bb23,
+ 0x7daaab3c
+ };
+
+ return git__hash(key, strlen((const char *)key), hash_seeds[hash_id]);
+}