Re: [PATCH v3 1/7] invalidate_ref_cache(): rename function from invalidate_cached_refs()

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v3 1/7] invalidate_ref_cache(): rename function from invalidate_cached_refs()

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:14

Michael Haggerty [off-list ref] writes:
It is the cache that is being invalidated, not the references.

Signed-off-by: Michael Haggerty <redacted>
---
quoted hunk
diff --git a/refs.c b/refs.c
index 9911c97..120b8e4 100644
--- a/refs.c
+++ b/refs.c
@@ -202,7 +202,7 @@ static struct cached_refs *get_cached_refs(const char *submodule)
 	return refs;
 }
 
-static void invalidate_cached_refs(void)
+static void invalidate_ref_cache(void)
 {
 	struct cached_refs *refs = cached_refs;
 	while (refs) {
If you call the operation "invalidate ref_cache", shouldn't the data
structure that holds that cache also be renamed to "struct ref_cache" from
"struct "cached_refs" at the same time?

Re: [PATCH v3 1/7] invalidate_ref_cache(): rename function from invalidate_cached_refs()

From: Michael Haggerty <hidden>
Date: 2016-06-15 22:52:14

On 10/12/2011 09:14 PM, Junio C Hamano wrote:
Michael Haggerty [off-list ref] writes:
quoted
It is the cache that is being invalidated, not the references.

Signed-off-by: Michael Haggerty <redacted>
---
quoted
diff --git a/refs.c b/refs.c
index 9911c97..120b8e4 100644
--- a/refs.c
+++ b/refs.c
@@ -202,7 +202,7 @@ static struct cached_refs *get_cached_refs(const char *submodule)
 	return refs;
 }
 
-static void invalidate_cached_refs(void)
+static void invalidate_ref_cache(void)
 {
 	struct cached_refs *refs = cached_refs;
 	while (refs) {
If you call the operation "invalidate ref_cache", shouldn't the data
structure that holds that cache also be renamed to "struct ref_cache" from
"struct "cached_refs" at the same time?
I don't think it is a logical necessity but I agree that it would be
more consistent.  I'll make the change in the next round.

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help