Skip to content

Commit c5f29ab

Browse files
mhaggergitster
authored andcommitted
clear_ref_cache(): inline function
clear_ref_cache() was only called from one place, so inline it there. Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8bf90dc commit c5f29ab

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

refs.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,6 @@ static void clear_loose_ref_cache(struct ref_cache *refs)
172172
refs->did_loose = 0;
173173
}
174174

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-
181175
static struct ref_cache *create_ref_cache(const char *submodule)
182176
{
183177
int len;
@@ -215,7 +209,9 @@ static struct ref_cache *get_ref_cache(const char *submodule)
215209

216210
void invalidate_ref_cache(const char *submodule)
217211
{
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);
219215
}
220216

221217
static void read_packed_refs(FILE *f, struct ref_array *array)

0 commit comments

Comments
 (0)