aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-04-16 08:41:28 +0200
committerJunio C Hamano <gitster@pobox.com>2017-04-16 21:32:45 -0700
commita3ade2baba958d758b4b808e466bb8367e81e168 (patch)
tree522ed7b373a086ac96157bc8c2477b4ead038e1c
parent524a9fdb51b1c7de5bcb83f6ea44015dabef466c (diff)
downloadgit-a3ade2baba958d758b4b808e466bb8367e81e168.tar.gz
git-a3ade2baba958d758b4b808e466bb8367e81e168.tar.xz
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>
-rw-r--r--refs/files-backend.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index cf1c18cff..05029d43b 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -455,7 +455,7 @@ static int remove_entry(struct ref_dir *dir, const char *refname)
* subdirectories as necessary. dir must represent the top-level
* directory. Return 0 on success.
*/
-static int add_ref(struct ref_dir *dir, struct ref_entry *ref)
+static int add_ref_entry(struct ref_dir *dir, struct ref_entry *ref)
{
dir = find_containing_dir(dir, ref->name, 1);
if (!dir)
@@ -993,7 +993,7 @@ static void read_packed_refs(FILE *f, struct ref_dir *dir)
if (peeled == PEELED_FULLY ||
(peeled == PEELED_TAGS && starts_with(refname, "refs/tags/")))
last->flag |= REF_KNOWS_PEELED;
- add_ref(dir, last);
+ add_ref_entry(dir, last);
continue;
}
if (last &&
@@ -1115,7 +1115,7 @@ static void add_packed_ref(struct files_ref_store *refs,
if (!packed_ref_cache->lock)
die("internal error: packed refs not locked");
- add_ref(get_packed_ref_dir(packed_ref_cache),
+ add_ref_entry(get_packed_ref_dir(packed_ref_cache),
create_ref_entry(refname, sha1, REF_ISPACKED, 1));
}
@@ -2176,7 +2176,7 @@ static int pack_if_possible_fn(struct ref_entry *entry, void *cb_data)
} else {
packed_entry = create_ref_entry(entry->name, entry->u.value.oid.hash,
REF_ISPACKED | REF_KNOWS_PEELED, 0);
- add_ref(cb->packed_refs, packed_entry);
+ add_ref_entry(cb->packed_refs, packed_entry);
}
oidcpy(&packed_entry->u.value.peeled, &entry->u.value.peeled);