summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b917662)
raw | patch | inline | side by side (parent: b917662)
author | Michael Haggerty <mhagger@alum.mit.edu> | |
Fri, 12 Aug 2011 22:36:24 +0000 (00:36 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 14 Aug 2011 22:18:51 +0000 (15:18 -0700) |
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c | patch | blob | history |
index 3a8789d3857d17a3a0a94ba2750e9f22857b8667..9dc25c3984236a7d661cb4d58d6ef619ebac0f3a 100644 (file)
--- a/refs.c
+++ b/refs.c
}
}
-static void invalidate_cached_refs(void)
+static void clear_cached_refs(struct cached_refs *ca)
{
- struct cached_refs *ca = &cached_refs;
-
if (ca->did_loose && ca->loose)
free_ref_list(ca->loose);
if (ca->did_packed && ca->packed)
ca->did_loose = ca->did_packed = 0;
}
+static void invalidate_cached_refs(void)
+{
+ clear_cached_refs(&cached_refs);
+}
+
static void read_packed_refs(FILE *f, struct cached_refs *cached_refs)
{
struct ref_list *list = NULL;