get_packed_refs(): take a `packed_ref_store *` parameter

It only cares about the packed-refs part of the reference store. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Jun 23, 2017 at 09:01 UTC a9169f5dc2ca4ed1059d9733661058f9e5311724
1 file changed +5 -5
refs/files-backend.c
+5 -5
@@ -427,9 +427,9 @@ static struct ref_dir *get_packed_ref_dir(struct packed_ref_cache *packed_ref_ca
427 return get_ref_dir(packed_ref_cache->cache->root);
428 }
429
430 -static struct ref_dir *get_packed_refs(struct files_ref_store *refs)
430 +static struct ref_dir *get_packed_refs(struct packed_ref_store *refs)
431 {
432 - return get_packed_ref_dir(get_packed_ref_cache(refs->packed_ref_store));
432 + return get_packed_ref_dir(get_packed_ref_cache(refs));
433 }
434
435 /*
@@ -450,7 +450,7 @@ static void add_packed_ref(struct files_ref_store *refs,
450 if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL))
451 die("Reference has invalid format: '%s'", refname);
452
453 - packed_refs = get_packed_refs(refs);
453 + packed_refs = get_packed_refs(refs->packed_ref_store);
454 packed_entry = find_ref_entry(packed_refs, refname);
455 if (packed_entry) {
456 /* Overwrite the existing entry: */
@@ -592,7 +592,7 @@ static struct ref_cache *get_loose_ref_cache(struct files_ref_store *refs)
592 static struct ref_entry *get_packed_ref(struct files_ref_store *refs,
593 const char *refname)
594 {
595 - return find_ref_entry(get_packed_refs(refs), refname);
595 + return find_ref_entry(get_packed_refs(refs->packed_ref_store), refname);
596 }
597
598 /*
@@ -1633,7 +1633,7 @@ static int repack_without_refs(struct files_ref_store *refs,
1633 unable_to_lock_message(refs->packed_ref_store->path, errno, err);
1634 return -1;
1635 }
1636 - packed = get_packed_refs(refs);
1636 + packed = get_packed_refs(refs->packed_ref_store);
1637
1638 /* Remove refnames from the cache */
1639 for_each_string_list_item(refname, refnames)