ref-cache: rename `add_ref()` to `add_ref_entry()`

This function's visibility is about to be increased, so give it a more distinctive name. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Apr 16, 2017 at 08:41 UTC a3ade2baba958d758b4b808e466bb8367e81e168
1 file changed +4 -4
refs/files-backend.c
+4 -4
@@ -455,7 +455,7 @@ static int remove_entry(struct ref_dir *dir, const char *refname)
455 * subdirectories as necessary. dir must represent the top-level
456 * directory. Return 0 on success.
457 */
458 -static int add_ref(struct ref_dir *dir, struct ref_entry *ref)
458 +static int add_ref_entry(struct ref_dir *dir, struct ref_entry *ref)
459 {
460 dir = find_containing_dir(dir, ref->name, 1);
461 if (!dir)
@@ -993,7 +993,7 @@ static void read_packed_refs(FILE *f, struct ref_dir *dir)
993 if (peeled == PEELED_FULLY ||
994 (peeled == PEELED_TAGS && starts_with(refname, "refs/tags/")))
995 last->flag |= REF_KNOWS_PEELED;
996 - add_ref(dir, last);
996 + add_ref_entry(dir, last);
997 continue;
998 }
999 if (last &&
@@ -1115,7 +1115,7 @@ static void add_packed_ref(struct files_ref_store *refs,
1115
1116 if (!packed_ref_cache->lock)
1117 die("internal error: packed refs not locked");
1118 - add_ref(get_packed_ref_dir(packed_ref_cache),
1118 + add_ref_entry(get_packed_ref_dir(packed_ref_cache),
1119 create_ref_entry(refname, sha1, REF_ISPACKED, 1));
1120 }
1121
@@ -2176,7 +2176,7 @@ static int pack_if_possible_fn(struct ref_entry *entry, void *cb_data)
2176 } else {
2177 packed_entry = create_ref_entry(entry->name, entry->u.value.oid.hash,
2178 REF_ISPACKED | REF_KNOWS_PEELED, 0);
2179 - add_ref(cb->packed_refs, packed_entry);
2179 + add_ref_entry(cb->packed_refs, packed_entry);
2180 }
2181 oidcpy(&packed_entry->u.value.peeled, &entry->u.value.peeled);
2182