refs: pass ref store when detecting dangling symrefs

Both `warn_dangling_symref()` and `warn_dangling_symrefs()` derive the
ref store via `the_repository`. Adapt them to instead take in the ref
store as a parameter. While at it, rename the functions to have a `ref_`
prefix to align them with other functions that take a ref store.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-05-17 10:18:53 +02:00
committed by Junio C Hamano
parent 8378c9d27b
commit 330a2ae60b
4 changed files with 28 additions and 25 deletions

View File

@ -1412,7 +1412,8 @@ static int prune_refs(struct display_state *display_state,
_("(none)"), ref->name,
&ref->new_oid, &ref->old_oid,
summary_width);
warn_dangling_symref(stderr, dangling_msg, ref->name);
refs_warn_dangling_symref(get_main_ref_store(the_repository),
stderr, dangling_msg, ref->name);
}
}