diff options
| author | Patrick Steinhardt <ps@pks.im> | 2020-06-08 12:39:09 +0200 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2020-06-08 21:17:57 +0200 |
| commit | 7c499b544dc3383cce38956f86d67f328bc718e6 (patch) | |
| tree | 2067e61a499af26f33725ddba35f389d67a2e732 /src | |
| parent | b221755227c0a7155d83dc595e3902649fa0760b (diff) | |
| download | libgit2-7c499b544dc3383cce38956f86d67f328bc718e6.tar.gz | |
tree-wide: remove unused functions
We have some functions which aren't used anywhere. Let's remove them to
get rid of unneeded baggage.
Diffstat (limited to 'src')
| -rw-r--r-- | src/cache.c | 21 | ||||
| -rw-r--r-- | src/diff.c | 5 | ||||
| -rw-r--r-- | src/idxmap.c | 22 | ||||
| -rw-r--r-- | src/reflog.c | 5 |
4 files changed, 0 insertions, 53 deletions
diff --git a/src/cache.c b/src/cache.c index af42b3959..1d2c0158d 100644 --- a/src/cache.c +++ b/src/cache.c @@ -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)); diff --git a/src/diff.c b/src/diff.c index 47f49d949..efbedb50b 100644 --- a/src/diff.c +++ b/src/diff.c @@ -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; diff --git a/src/idxmap.c b/src/idxmap.c index 4dcf963b3..bc23608f2 100644 --- a/src/idxmap.c +++ b/src/idxmap.c @@ -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); diff --git a/src/reflog.c b/src/reflog.c index 24dada047..33b7310b5 100644 --- a/src/reflog.c +++ b/src/reflog.c @@ -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); |
