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:
committed by
Junio C Hamano
parent
8378c9d27b
commit
330a2ae60b
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user