aboutsummaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorJialong Wang <jerrywang183@yahoo.com>2026-03-18 15:09:42 -0400
committerJunio C Hamano <gitster@pobox.com>2026-03-18 12:52:29 -0700
commitc5fc44f54595f123c277e5839cbafa1bc9c8c050 (patch)
tree4956573f4efd25c79ae9f535e192d97fbeaca8a7 /refs.h
parentca1db8a0f7dc0dbea892e99f5b37c5fe5861be71 (diff)
downloadgit-c5fc44f54595f123c277e5839cbafa1bc9c8c050.tar.xz
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 <jerrywang183@yahoo.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/refs.h b/refs.h
index d98c1fc591..d65de6ab5f 100644
--- a/refs.h
+++ b/refs.h
@@ -1,6 +1,7 @@
#ifndef REFS_H
#define REFS_H
+#include "object-name.h"
#include "commit.h"
#include "repository.h"
#include "repo-settings.h"
@@ -225,7 +226,7 @@ char *repo_default_branch_name(struct repository *r, int quiet);
* repo_interpret_branch_name() for details.
*/
void copy_branchname(struct strbuf *sb, const char *name,
- unsigned allowed);
+ enum interpret_branch_kind allowed);
/*
* Like copy_branchname() above, but confirm that the result is