From 93e5e048f84138a632b239632c9b45ae238cdf1c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 3 Dec 2024 11:32:38 +0900 Subject: refs: drop strbuf_ prefix from helpers The helper functions (strbuf_branchname, strbuf_check_branch_ref, and strbuf_check_tag_ref) are about handling branch and tag names, and it is a non-essential fact that these functions use strbuf to hold these names. Rename them to make it clarify that these are more about "ref". Signed-off-by: Junio C Hamano --- builtin/check-ref-format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/check-ref-format.c') diff --git a/builtin/check-ref-format.c b/builtin/check-ref-format.c index e86d8ef980..cef1ffe3ce 100644 --- a/builtin/check-ref-format.c +++ b/builtin/check-ref-format.c @@ -42,7 +42,7 @@ static int check_ref_format_branch(const char *arg) int nongit; setup_git_directory_gently(&nongit); - if (strbuf_check_branch_ref(&sb, arg) || + if (check_branch_ref(&sb, arg) || !skip_prefix(sb.buf, "refs/heads/", &name)) die("'%s' is not a valid branch name", arg); printf("%s\n", name); -- cgit v1.2.3