Skip to content

Commit a9169f5

Browse files
mhaggergitster
authored andcommitted
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>
1 parent 8e821c3 commit a9169f5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

refs/files-backend.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@ static struct ref_dir *get_packed_ref_dir(struct packed_ref_cache *packed_ref_ca
427427
return get_ref_dir(packed_ref_cache->cache->root);
428428
}
429429

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)
431431
{
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));
433433
}
434434

435435
/*
@@ -450,7 +450,7 @@ static void add_packed_ref(struct files_ref_store *refs,
450450
if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL))
451451
die("Reference has invalid format: '%s'", refname);
452452

453-
packed_refs = get_packed_refs(refs);
453+
packed_refs = get_packed_refs(refs->packed_ref_store);
454454
packed_entry = find_ref_entry(packed_refs, refname);
455455
if (packed_entry) {
456456
/* Overwrite the existing entry: */
@@ -592,7 +592,7 @@ static struct ref_cache *get_loose_ref_cache(struct files_ref_store *refs)
592592
static struct ref_entry *get_packed_ref(struct files_ref_store *refs,
593593
const char *refname)
594594
{
595-
return find_ref_entry(get_packed_refs(refs), refname);
595+
return find_ref_entry(get_packed_refs(refs->packed_ref_store), refname);
596596
}
597597

598598
/*
@@ -1633,7 +1633,7 @@ static int repack_without_refs(struct files_ref_store *refs,
16331633
unable_to_lock_message(refs->packed_ref_store->path, errno, err);
16341634
return -1;
16351635
}
1636-
packed = get_packed_refs(refs);
1636+
packed = get_packed_refs(refs->packed_ref_store);
16371637

16381638
/* Remove refnames from the cache */
16391639
for_each_string_list_item(refname, refnames)

0 commit comments

Comments
 (0)