Commit 7c499b54 by Patrick Steinhardt

tree-wide: remove unused functions

We have some functions which aren't used anywhere. Let's remove them to
get rid of unneeded baggage.
parent b2217552
......@@ -41,27 +41,6 @@ int git_cache_set_max_object_size(git_object_t type, size_t size)
return 0;
}
void git_cache_dump_stats(git_cache *cache)
{
git_cached_obj *object;
if (git_cache_size(cache) == 0)
return;
printf("Cache %p: %"PRIuZ" items cached, %"PRIdZ" bytes\n",
cache, git_cache_size(cache), cache->used_memory);
git_oidmap_foreach_value(cache->map, object, {
char oid_str[9];
printf(" %s%c %s (%"PRIuZ")\n",
git_object_type2string(object->type),
object->flags == GIT_CACHE_STORE_PARSED ? '*' : ' ',
git_oid_tostr(oid_str, sizeof(oid_str), &object->oid),
object->size
);
});
}
int git_cache_init(git_cache *cache)
{
memset(cache, 0, sizeof(*cache));
......
......@@ -32,11 +32,6 @@ GIT_INLINE(const char *) diff_delta__path(const git_diff_delta *delta)
return str;
}
const char *git_diff_delta__path(const git_diff_delta *delta)
{
return diff_delta__path(delta);
}
int git_diff_delta__cmp(const void *a, const void *b)
{
const git_diff_delta *da = a, *db = b;
......
......@@ -138,28 +138,6 @@ void *git_idxmap_icase_get(git_idxmap_icase *map, const git_index_entry *key)
return kh_val(map, idx);
}
void git_idxmap_insert(git_idxmap *map, const git_index_entry *key, void *value, int *rval)
{
khiter_t idx = kh_put(idx, map, key, rval);
if ((*rval) >= 0) {
if ((*rval) == 0)
kh_key(map, idx) = key;
kh_val(map, idx) = value;
}
}
void git_idxmap_icase_insert(git_idxmap_icase *map, const git_index_entry *key, void *value, int *rval)
{
khiter_t idx = kh_put(idxicase, map, key, rval);
if ((*rval) >= 0) {
if ((*rval) == 0)
kh_key(map, idx) = key;
kh_val(map, idx) = value;
}
}
int git_idxmap_delete(git_idxmap *map, const git_index_entry *key)
{
khiter_t idx = kh_get(idx, map, key);
......
......@@ -14,11 +14,6 @@
#include <git2/sys/refdb_backend.h>
git_reflog_entry *git_reflog_entry__alloc(void)
{
return git__calloc(1, sizeof(git_reflog_entry));
}
void git_reflog_entry__free(git_reflog_entry *entry)
{
git_signature_free(entry->committer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment