Git fork

ref-cache: remove unused function 'find_ref_entry()'

The 'find_ref_entry' function is no longer used, so remove it.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Karthik Nayak and committed by
Junio C Hamano
883a7ea0 6bde5d43

-21
-14
refs/ref-cache.c
··· 194 194 return dir; 195 195 } 196 196 197 - struct ref_entry *find_ref_entry(struct ref_dir *dir, const char *refname) 198 - { 199 - int entry_index; 200 - struct ref_entry *entry; 201 - dir = find_containing_dir(dir, refname); 202 - if (!dir) 203 - return NULL; 204 - entry_index = search_ref_dir(dir, refname, strlen(refname)); 205 - if (entry_index == -1) 206 - return NULL; 207 - entry = dir->entries[entry_index]; 208 - return (entry->flag & REF_DIR) ? NULL : entry; 209 - } 210 - 211 197 /* 212 198 * Emit a warning and return true iff ref1 and ref2 have the same name 213 199 * and the same oid. Die if they have the same name but different
-7
refs/ref-cache.h
··· 202 202 void add_entry_to_dir(struct ref_dir *dir, struct ref_entry *entry); 203 203 204 204 /* 205 - * Find the value entry with the given name in dir, sorting ref_dirs 206 - * and recursing into subdirectories as necessary. If the name is not 207 - * found or it corresponds to a directory entry, return NULL. 208 - */ 209 - struct ref_entry *find_ref_entry(struct ref_dir *dir, const char *refname); 210 - 211 - /* 212 205 * Start iterating over references in `cache`. If `prefix` is 213 206 * specified, only include references whose names start with that 214 207 * prefix. If `prime_dir` is true, then fill any incomplete