refs.c: refactor to reuse ref_is_hidden()
Add new function `ref_is_matched()` to reuse `ref_is_hidden()`. Will use this function for `receive-pack` to check commands with specific prefixes. Test case t5512 covered this change. Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
64998a979c
commit
fc2cadab10
1
refs.h
1
refs.h
@ -727,6 +727,7 @@ int parse_hide_refs_config(const char *var, const char *value, const char *);
|
||||
* parameter always points to the full ref name.
|
||||
*/
|
||||
int ref_is_hidden(const char *, const char *);
|
||||
int ref_matches(struct string_list *, const char *, const char *);
|
||||
|
||||
enum ref_type {
|
||||
REF_TYPE_PER_WORKTREE, /* refs inside refs/ but not shared */
|
||||
|
Reference in New Issue
Block a user