From c5fc44f54595f123c277e5839cbafa1bc9c8c050 Mon Sep 17 00:00:00 2001 From: Jialong Wang Date: Wed, 18 Mar 2026 15:09:42 -0400 Subject: object-name: turn INTERPRET_BRANCH_* constants into enum values Replace the INTERPRET_BRANCH_* preprocessor constants with enum values and use that type where these flags are stored or passed around. These flags describe which kinds of branches may be considered during branch-name interpretation, so represent them as an enum describing branch kinds while keeping the existing bitmask semantics and INTERPRET_BRANCH_* element names. Signed-off-by: Jialong Wang Signed-off-by: Junio C Hamano --- refs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'refs.c') diff --git a/refs.c b/refs.c index 6fb8f9d10c..18b28db6d4 100644 --- a/refs.c +++ b/refs.c @@ -740,7 +740,8 @@ static char *substitute_branch_name(struct repository *r, return NULL; } -void copy_branchname(struct strbuf *sb, const char *name, unsigned allowed) +void copy_branchname(struct strbuf *sb, const char *name, + enum interpret_branch_kind allowed) { int len = strlen(name); struct interpret_branch_name_options options = { -- cgit v1.3-6-g1900