Skip to content

Commit 746593b

Browse files
stefanbellergitster
authored andcommitted
refs: remove unused function invalidate_ref_cache
The function 'invalidate_ref_cache' was introduced in 79c7ca5 (2011-10-17, invalidate_ref_cache(): rename function from invalidate_cached_refs()) by a rename and elevated to be publicly usable in 8be8bde (2011-10-17, invalidate_ref_cache(): expose this function in the refs API) However it is not used anymore, as 8bf90dc (2011-10-17, write_ref_sha1(): only invalidate the loose ref cache) and (much) later 506a760 (2013-04-22, refs: change how packed refs are deleted) removed any calls to this function. So it seems as if we don't need that function any more, good bye! Signed-off-by: Stefan Beller <[email protected]> Acked-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ca46280 commit 746593b

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

refs.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -943,13 +943,6 @@ static struct ref_cache *get_ref_cache(const char *submodule)
943943
return refs;
944944
}
945945

946-
void invalidate_ref_cache(const char *submodule)
947-
{
948-
struct ref_cache *refs = get_ref_cache(submodule);
949-
clear_packed_ref_cache(refs);
950-
clear_loose_ref_cache(refs);
951-
}
952-
953946
/* The length of a peeled reference line in packed-refs, including EOL: */
954947
#define PEELED_LINE_LENGTH 42
955948

refs.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,6 @@ extern void unlock_ref(struct ref_lock *lock);
151151
/** Writes sha1 into the ref specified by the lock. **/
152152
extern int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, const char *msg);
153153

154-
/*
155-
* Invalidate the reference cache for the specified submodule. Use
156-
* submodule=NULL to invalidate the cache for the main module. This
157-
* function must be called if references are changed via a mechanism
158-
* other than the refs API.
159-
*/
160-
extern void invalidate_ref_cache(const char *submodule);
161-
162154
/** Setup reflog before using. **/
163155
int log_ref_setup(const char *ref_name, char *logfile, int bufsize);
164156

0 commit comments

Comments
 (0)