aboutsummaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-06-23 09:01:27 +0200
committerJunio C Hamano <gitster@pobox.com>2017-06-23 13:27:32 -0700
commita9169f5dc2ca4ed1059d9733661058f9e5311724 (patch)
treeecfc5a710a5bf21b4e8a2e5b5007d3b07b0751be /refs
parent8e821c38f76c49e0e679c8d79c0b150d18aba155 (diff)
downloadgit-a9169f5dc2ca4ed1059d9733661058f9e5311724.tar.gz
git-a9169f5dc2ca4ed1059d9733661058f9e5311724.tar.xz
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>
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index b2ef7b3bb..bc5c0de84 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -427,9 +427,9 @@ static struct ref_dir *get_packed_ref_dir(struct packed_ref_cache *packed_ref_ca
return get_ref_dir(packed_ref_cache->cache->root);
}
-static struct ref_dir *get_packed_refs(struct files_ref_store *refs)
+static struct ref_dir *get_packed_refs(struct packed_ref_store *refs)
{
- return get_packed_ref_dir(get_packed_ref_cache(refs->packed_ref_store));
+ return get_packed_ref_dir(get_packed_ref_cache(refs));
}
/*
@@ -450,7 +450,7 @@ static void add_packed_ref(struct files_ref_store *refs,
if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL))
die("Reference has invalid format: '%s'", refname);
- packed_refs = get_packed_refs(refs);
+ packed_refs = get_packed_refs(refs->packed_ref_store);
packed_entry = find_ref_entry(packed_refs, refname);
if (packed_entry) {
/* Overwrite the existing entry: */
@@ -592,7 +592,7 @@ static struct ref_cache *get_loose_ref_cache(struct files_ref_store *refs)
static struct ref_entry *get_packed_ref(struct files_ref_store *refs,
const char *refname)
{
- return find_ref_entry(get_packed_refs(refs), refname);
+ return find_ref_entry(get_packed_refs(refs->packed_ref_store), refname);
}
/*
@@ -1633,7 +1633,7 @@ static int repack_without_refs(struct files_ref_store *refs,
unable_to_lock_message(refs->packed_ref_store->path, errno, err);
return -1;
}
- packed = get_packed_refs(refs);
+ packed = get_packed_refs(refs->packed_ref_store);
/* Remove refnames from the cache */
for_each_string_list_item(refname, refnames)