summaryrefslogtreecommitdiff
path: root/src/refs.c
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2011-12-16 10:56:43 -0800
committerRussell Belfer <arrbee@arrbee.com>2011-12-20 16:32:58 -0800
commitee1f0b1aed7798908d9e038b006b66f868613fc3 (patch)
treec60350029b9e4bb14811ac13caf59ad86424f33e /src/refs.c
parentbe00b00dd1468f1c625ca3fadc61f2a16edfb8d5 (diff)
downloadlibgit2-ee1f0b1aed7798908d9e038b006b66f868613fc3.tar.gz
Add APIs for git attributes
This adds APIs for querying git attributes. In addition to the new API in include/git2/attr.h, most of the action is in src/attr_file.[hc] which contains utilities for dealing with a single attributes file, and src/attr.[hc] which contains the implementation of the APIs that merge all applicable attributes files.
Diffstat (limited to 'src/refs.c')
-rw-r--r--src/refs.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/refs.c b/src/refs.c
index 8c3f700ad..cf76b23be 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -31,17 +31,6 @@ struct packref {
static const int default_table_size = 32;
-static uint32_t reftable_hash(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]);
-}
-
static int reference_read(
git_fbuffer *file_content,
time_t *mtime,
@@ -443,9 +432,7 @@ static int packed_load(git_repository *repo)
/* First we make sure we have allocated the hash table */
if (ref_cache->packfile == NULL) {
ref_cache->packfile = git_hashtable_alloc(
- default_table_size,
- reftable_hash,
- (git_hash_keyeq_ptr)&git__strcmp_cb);
+ default_table_size, git_hash__strhash_cb, git_hash__strcmp_cb);
if (ref_cache->packfile == NULL) {
error = GIT_ENOMEM;