]> git.ipfire.org Git - thirdparty/git.git/commitdiff
refs: remove unused function invalidate_ref_cache
authorStefan Beller <stefanbeller@googlemail.com>
Sat, 26 Oct 2013 17:03:01 +0000 (19:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Oct 2013 15:55:56 +0000 (08:55 -0700)
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 <stefanbeller@googlemail.com>
Acked-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
refs.h

diff --git a/refs.c b/refs.c
index 7922261580515859bc89005c4c69e8623c50c728..d20834054ba1ddb32c00aceb4896098dae0844f6 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -943,13 +943,6 @@ static struct ref_cache *get_ref_cache(const char *submodule)
        return refs;
 }
 
-void invalidate_ref_cache(const char *submodule)
-{
-       struct ref_cache *refs = get_ref_cache(submodule);
-       clear_packed_ref_cache(refs);
-       clear_loose_ref_cache(refs);
-}
-
 /* The length of a peeled reference line in packed-refs, including EOL: */
 #define PEELED_LINE_LENGTH 42
 
diff --git a/refs.h b/refs.h
index 9e5db3ae26ec7898d8ee9083c37562d3af05c0ab..861170d691e83d299ad3586bd430e3938b056db0 100644 (file)
--- a/refs.h
+++ b/refs.h
@@ -151,14 +151,6 @@ extern void unlock_ref(struct ref_lock *lock);
 /** Writes sha1 into the ref specified by the lock. **/
 extern int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, const char *msg);
 
-/*
- * Invalidate the reference cache for the specified submodule.  Use
- * submodule=NULL to invalidate the cache for the main module.  This
- * function must be called if references are changed via a mechanism
- * other than the refs API.
- */
-extern void invalidate_ref_cache(const char *submodule);
-
 /** Setup reflog before using. **/
 int log_ref_setup(const char *ref_name, char *logfile, int bufsize);