Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
clear_ref_array(): rename from free_ref_array()
author
Michael Haggerty
<mhagger@alum.mit.edu>
Mon, 12 Dec 2011 05:38:11 +0000
(06:38 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 12 Dec 2011 17:08:51 +0000
(09:08 -0800)
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>
refs.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
85be1fe
)
diff --git
a/refs.c
b/refs.c
index 9f7a5ec46b8bcfd6fc62b67894f3ad3a7e0a8e45..7be91d16e0b0ab66d8ffb51a81514c9fbc1442e5 100644
(file)
--- a/
refs.c
+++ b/
refs.c
@@
-149,7
+149,7
@@
static struct ref_entry *current_ref;
static struct ref_array extra_refs;
static struct ref_array extra_refs;
-static void
free
_ref_array(struct ref_array *array)
+static void
clear
_ref_array(struct ref_array *array)
{
int i;
for (i = 0; i < array->nr; i++)
{
int i;
for (i = 0; i < array->nr; i++)
@@
-162,14
+162,14
@@
static void free_ref_array(struct ref_array *array)
static void clear_packed_ref_cache(struct ref_cache *refs)
{
if (refs->did_packed)
static void clear_packed_ref_cache(struct ref_cache *refs)
{
if (refs->did_packed)
-
free
_ref_array(&refs->packed);
+
clear
_ref_array(&refs->packed);
refs->did_packed = 0;
}
static void clear_loose_ref_cache(struct ref_cache *refs)
{
if (refs->did_loose)
refs->did_packed = 0;
}
static void clear_loose_ref_cache(struct ref_cache *refs)
{
if (refs->did_loose)
-
free
_ref_array(&refs->loose);
+
clear
_ref_array(&refs->loose);
refs->did_loose = 0;
}
refs->did_loose = 0;
}
@@
-256,7
+256,7
@@
void add_extra_ref(const char *refname, const unsigned char *sha1, int flag)
void clear_extra_refs(void)
{
void clear_extra_refs(void)
{
-
free
_ref_array(&extra_refs);
+
clear
_ref_array(&extra_refs);
}
static struct ref_array *get_packed_refs(const char *submodule)
}
static struct ref_array *get_packed_refs(const char *submodule)