]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ref-cache: rename `add_ref()` to `add_ref_entry()`
authorMichael Haggerty <mhagger@alum.mit.edu>
Sun, 16 Apr 2017 06:41:28 +0000 (08:41 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Apr 2017 04:32:45 +0000 (21:32 -0700)
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>
refs/files-backend.c

index cf1c18cffb66ed3e4cff08182fa96217aa09fcb8..05029d43b84fe9e873d59e08313eafad53c13933 100644 (file)
@@ -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);