invalidate_ref_cache(): expose this function in the refs API

Make invalidate_ref_cache() an official part of the refs API.  It is
currently a fact of life that code outside of refs.c mucks about with
references.  This change gives such code a way of informing the refs
module that it should no longer trust its cache.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Michael Haggerty
2011-10-17 04:38:07 +02:00
committed by Junio C Hamano
parent 3870a0d1d8
commit 8be8bde75f
2 changed files with 9 additions and 1 deletions

2
refs.c
View File

@ -202,7 +202,7 @@ static struct ref_cache *get_ref_cache(const char *submodule)
return refs;
}
static void invalidate_ref_cache(const char *submodule)
void invalidate_ref_cache(const char *submodule)
{
clear_ref_cache(get_ref_cache(submodule));
}