From: Junio C Hamano Date: Mon, 15 Jun 2015 18:13:22 GMT Subject: Re: [PATCH v2 12/12] refs: move the remaining ref module declarations to refs.h Message-ID: In-Reply-To: <79947baebd702f8e9fe9b667e2eeb69afa73094b.1434206062.git.mhagger@alum.mit.edu> Michael Haggerty writes: > Some functions from the refs module were still declared in cache.h. > Move them to refs.h. Yay. But... > Add some parameter names where they were missing. ... I do not think some of this is a good change. > @@ -78,15 +170,15 @@ typedef int each_ref_fn(const char *refname, > * modifies the reference also returns a nonzero value to immediately > * stop the iteration. > */ > -extern int head_ref(each_ref_fn, void *); > +extern int head_ref(each_ref_fn fn, void *cb_data); For example, between these two, what did we gain? Because of their types, it already was clear what the two parameters are in the original, without noisewords like "fn" (which obviously stands for a "function", but that is clear due to "each_ref_fn"). > -extern int for_each_glob_ref_in(each_ref_fn, const char *pattern, const char* prefix, void *); > +extern int for_each_glob_ref_in(each_ref_fn fn, const char *pattern, const char* prefix, void *cb_data); Likewise for addition of fn and cb_data. If you really want to make unrelated changes to this file, what you should fix is to update "const char* prefix" to "const char *prefix" ;-)