Skip to content

Commit 7c499b5

Browse files
committed
tree-wide: remove unused functions
We have some functions which aren't used anywhere. Let's remove them to get rid of unneeded baggage.
1 parent b221755 commit 7c499b5

File tree

4 files changed

+0
-53
lines changed

4 files changed

+0
-53
lines changed

src/cache.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,6 @@ int git_cache_set_max_object_size(git_object_t type, size_t size)
4141
return 0;
4242
}
4343

44-
void git_cache_dump_stats(git_cache *cache)
45-
{
46-
git_cached_obj *object;
47-
48-
if (git_cache_size(cache) == 0)
49-
return;
50-
51-
printf("Cache %p: %"PRIuZ" items cached, %"PRIdZ" bytes\n",
52-
cache, git_cache_size(cache), cache->used_memory);
53-
54-
git_oidmap_foreach_value(cache->map, object, {
55-
char oid_str[9];
56-
printf(" %s%c %s (%"PRIuZ")\n",
57-
git_object_type2string(object->type),
58-
object->flags == GIT_CACHE_STORE_PARSED ? '*' : ' ',
59-
git_oid_tostr(oid_str, sizeof(oid_str), &object->oid),
60-
object->size
61-
);
62-
});
63-
}
64-
6544
int git_cache_init(git_cache *cache)
6645
{
6746
memset(cache, 0, sizeof(*cache));

src/diff.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ GIT_INLINE(const char *) diff_delta__path(const git_diff_delta *delta)
3232
return str;
3333
}
3434

35-
const char *git_diff_delta__path(const git_diff_delta *delta)
36-
{
37-
return diff_delta__path(delta);
38-
}
39-
4035
int git_diff_delta__cmp(const void *a, const void *b)
4136
{
4237
const git_diff_delta *da = a, *db = b;

src/idxmap.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -138,28 +138,6 @@ void *git_idxmap_icase_get(git_idxmap_icase *map, const git_index_entry *key)
138138
return kh_val(map, idx);
139139
}
140140

141-
void git_idxmap_insert(git_idxmap *map, const git_index_entry *key, void *value, int *rval)
142-
{
143-
khiter_t idx = kh_put(idx, map, key, rval);
144-
145-
if ((*rval) >= 0) {
146-
if ((*rval) == 0)
147-
kh_key(map, idx) = key;
148-
kh_val(map, idx) = value;
149-
}
150-
}
151-
152-
void git_idxmap_icase_insert(git_idxmap_icase *map, const git_index_entry *key, void *value, int *rval)
153-
{
154-
khiter_t idx = kh_put(idxicase, map, key, rval);
155-
156-
if ((*rval) >= 0) {
157-
if ((*rval) == 0)
158-
kh_key(map, idx) = key;
159-
kh_val(map, idx) = value;
160-
}
161-
}
162-
163141
int git_idxmap_delete(git_idxmap *map, const git_index_entry *key)
164142
{
165143
khiter_t idx = kh_get(idx, map, key);

src/reflog.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414

1515
#include <git2/sys/refdb_backend.h>
1616

17-
git_reflog_entry *git_reflog_entry__alloc(void)
18-
{
19-
return git__calloc(1, sizeof(git_reflog_entry));
20-
}
21-
2217
void git_reflog_entry__free(git_reflog_entry *entry)
2318
{
2419
git_signature_free(entry->committer);

0 commit comments

Comments
 (0)