Skip to content

Commit 6a99fa2

Browse files
avargitster
authored andcommitted
refs/ref-cache.[ch]: remove unused add_ref_entry()
This function has not been used since 9dd389f (packed_ref_store: get rid of the `ref_cache` entirely, 2017-09-25). Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 34e8a20 commit 6a99fa2

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

refs/ref-cache.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,6 @@ struct ref_entry *find_ref_entry(struct ref_dir *dir, const char *refname)
212212
return (entry->flag & REF_DIR) ? NULL : entry;
213213
}
214214

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-
224215
/*
225216
* Emit a warning and return true iff ref1 and ref2 have the same name
226217
* and the same oid. Die if they have the same name but different

refs/ref-cache.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,6 @@ void free_ref_cache(struct ref_cache *cache);
199199
*/
200200
void add_entry_to_dir(struct ref_dir *dir, struct ref_entry *entry);
201201

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-
209202
/*
210203
* Find the value entry with the given name in dir, sorting ref_dirs
211204
* and recursing into subdirectories as necessary. If the name is not

0 commit comments

Comments
 (0)