refs/ref-cache.[ch]: remove unused add_ref_entry()
This function has not been used since 9dd389f3d8d (packed_ref_store: get rid of the `ref_cache` entirely, 2017-09-25). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Sep 28, 2021 at 15:02 UTC
6a99fa2e9eaeb3347f9d129e1231d3e15353105d
2 files changed
-16
refs/ref-cache.c
-9
@@ -212,15 +212,6 @@ struct ref_entry *find_ref_entry(struct ref_dir *dir, const char *refname)
212
return (entry->flag & REF_DIR) ? NULL : entry;
213
}
214
215
-int add_ref_entry(struct ref_dir *dir, struct ref_entry *ref)
216
-{
217
- dir = find_containing_dir(dir, ref->name, 1);
218
- if (!dir)
219
- return -1;
220
- add_entry_to_dir(dir, ref);
221
- return 0;
222
-}
223
-
215
/*
216
* Emit a warning and return true iff ref1 and ref2 have the same name
217
* and the same oid. Die if they have the same name but different
refs/ref-cache.h
-7
@@ -199,13 +199,6 @@ void free_ref_cache(struct ref_cache *cache);
199
*/
200
void add_entry_to_dir(struct ref_dir *dir, struct ref_entry *entry);
201
202
-/*
203
- * Add a ref_entry to the ref_dir (unsorted), recursing into
204
- * subdirectories as necessary. dir must represent the top-level
205
- * directory. Return 0 on success.
206
- */
207
-int add_ref_entry(struct ref_dir *dir, struct ref_entry *ref);
208
-
202
/*
203
* Find the value entry with the given name in dir, sorting ref_dirs
204
* and recursing into subdirectories as necessary. If the name is not