clear_ref_cache(): inline function

clear_ref_cache() was only called from one place, so inline it there. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Oct 17, 2011 at 04:38 UTC c5f29abd8098275382ff56d8cbb00d660a64b43e
1 file changed +3 -7
refs.c
+3 -7
@@ -172,12 +172,6 @@ static void clear_loose_ref_cache(struct ref_cache *refs)
172 refs->did_loose = 0;
173 }
174
175 -static void clear_ref_cache(struct ref_cache *refs)
176 -{
177 - clear_packed_ref_cache(refs);
178 - clear_loose_ref_cache(refs);
179 -}
180 -
175 static struct ref_cache *create_ref_cache(const char *submodule)
176 {
177 int len;
@@ -215,7 +209,9 @@ static struct ref_cache *get_ref_cache(const char *submodule)
209
210 void invalidate_ref_cache(const char *submodule)
211 {
218 - clear_ref_cache(get_ref_cache(submodule));
212 + struct ref_cache *refs = get_ref_cache(submodule);
213 + clear_packed_ref_cache(refs);
214 + clear_loose_ref_cache(refs);
215 }
216
217 static void read_packed_refs(FILE *f, struct ref_array *array)