Skip to content

Commit 883a7ea

Browse files
KarthikNayakgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6bde5d4 commit 883a7ea

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

refs/ref-cache.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -194,20 +194,6 @@ static struct ref_dir *find_containing_dir(struct ref_dir *dir,
194194
return dir;
195195
}
196196

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-
211197
/*
212198
* Emit a warning and return true iff ref1 and ref2 have the same name
213199
* 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
@@ -201,13 +201,6 @@ void free_ref_cache(struct ref_cache *cache);
201201
*/
202202
void add_entry_to_dir(struct ref_dir *dir, struct ref_entry *entry);
203203

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-
211204
/*
212205
* Start iterating over references in `cache`. If `prefix` is
213206
* specified, only include references whose names start with that

0 commit comments

Comments
 (0)