clear_ref_array(): rename from free_ref_array()

Rename the function since it doesn't actually free the array object that is passed to it. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Dec 12, 2011 at 06:38 UTC 7c59511ed54aec999c7df3bd8e79b1eb33b92fa6
1 file changed +4 -4
refs.c
+4 -4
@@ -149,7 +149,7 @@ static struct ref_entry *current_ref;
149
150 static struct ref_array extra_refs;
151
152 -static void free_ref_array(struct ref_array *array)
152 +static void clear_ref_array(struct ref_array *array)
153 {
154 int i;
155 for (i = 0; i < array->nr; i++)
@@ -162,14 +162,14 @@ static void free_ref_array(struct ref_array *array)
162 static void clear_packed_ref_cache(struct ref_cache *refs)
163 {
164 if (refs->did_packed)
165 - free_ref_array(&refs->packed);
165 + clear_ref_array(&refs->packed);
166 refs->did_packed = 0;
167 }
168
169 static void clear_loose_ref_cache(struct ref_cache *refs)
170 {
171 if (refs->did_loose)
172 - free_ref_array(&refs->loose);
172 + clear_ref_array(&refs->loose);
173 refs->did_loose = 0;
174 }
175
@@ -256,7 +256,7 @@ void add_extra_ref(const char *refname, const unsigned char *sha1, int flag)
256
257 void clear_extra_refs(void)
258 {
259 - free_ref_array(&extra_refs);
259 + clear_ref_array(&extra_refs);
260 }
261
262 static struct ref_array *get_packed_refs(const char *submodule)