]> git.ipfire.org Git - thirdparty/git.git/commitdiff
refs/ref-cache.[ch]: remove unused add_ref_entry()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 28 Sep 2021 13:02:22 +0000 (15:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Sep 2021 22:12:04 +0000 (15:12 -0700)
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>
refs/ref-cache.c
refs/ref-cache.h

index e0feebf628ff3abfcba2888e8891e9002424d029..a28883768c9a6e2b9624e40181d3b530674bb153 100644 (file)
@@ -212,15 +212,6 @@ struct ref_entry *find_ref_entry(struct ref_dir *dir, const char *refname)
        return (entry->flag & REF_DIR) ? NULL : entry;
 }
 
-int add_ref_entry(struct ref_dir *dir, struct ref_entry *ref)
-{
-       dir = find_containing_dir(dir, ref->name, 1);
-       if (!dir)
-               return -1;
-       add_entry_to_dir(dir, ref);
-       return 0;
-}
-
 /*
  * Emit a warning and return true iff ref1 and ref2 have the same name
  * and the same oid. Die if they have the same name but different
index bd1ff578ea2d329e87198cd3ce3c71bd1c925f1e..580d4038f622fec946490f82bd6596493f928853 100644 (file)
@@ -199,13 +199,6 @@ void free_ref_cache(struct ref_cache *cache);
  */
 void add_entry_to_dir(struct ref_dir *dir, struct ref_entry *entry);
 
-/*
- * Add a ref_entry to the ref_dir (unsorted), recursing into
- * subdirectories as necessary.  dir must represent the top-level
- * directory.  Return 0 on success.
- */
-int add_ref_entry(struct ref_dir *dir, struct ref_entry *ref);
-
 /*
  * Find the value entry with the given name in dir, sorting ref_dirs
  * and recursing into subdirectories as necessary.  If the name is not