get_ref_map(): rename local variables
Rename "refs" -> "refspecs" and "ref_count" -> "refspec_count" to reduce confusion, because they describe an array of "struct refspec", as opposed to the "struct ref" objects that are also used in this function. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Oct 23, 2013 at 17:50 UTC
f137a45e0db9823d386b18a7a9f5e0fc06c0b67d
1 file changed
+6
-6
builtin/fetch.c
+6
-6
@@ -165,8 +165,8 @@ static void find_non_local_tags(struct transport *transport,
165
struct ref ***tail);
166
167
static struct ref *get_ref_map(struct transport *transport,
168
- struct refspec *refs, int ref_count, int tags,
169
- int *autotags)
168
+ struct refspec *refspecs, int refspec_count,
169
+ int tags, int *autotags)
170
{
171
int i;
172
struct ref *rm;
@@ -175,12 +175,12 @@ static struct ref *get_ref_map(struct transport *transport,
175
176
const struct ref *remote_refs = transport_get_remote_refs(transport);
177
178
- if (ref_count || tags == TAGS_SET) {
178
+ if (refspec_count || tags == TAGS_SET) {
179
struct ref **old_tail;
180
181
- for (i = 0; i < ref_count; i++) {
182
- get_fetch_map(remote_refs, &refs[i], &tail, 0);
183
- if (refs[i].dst && refs[i].dst[0])
181
+ for (i = 0; i < refspec_count; i++) {
182
+ get_fetch_map(remote_refs, &refspecs[i], &tail, 0);
183
+ if (refspecs[i].dst && refspecs[i].dst[0])
184
*autotags = 1;
185
}
186
/* Merge everything on the command line, but not --tags */