diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-12-03 11:32:38 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-03 12:38:49 +0900 |
| commit | 93e5e048f84138a632b239632c9b45ae238cdf1c (patch) | |
| tree | c36bf96685b1dee17310963333b7d6f2bb2e6db5 /builtin/check-ref-format.c | |
| parent | refs: move ref name helpers around (diff) | |
| download | git-93e5e048f84138a632b239632c9b45ae238cdf1c.tar.gz git-93e5e048f84138a632b239632c9b45ae238cdf1c.zip | |
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 <gitster@pobox.com>
Diffstat (limited to 'builtin/check-ref-format.c')
| -rw-r--r-- | builtin/check-ref-format.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |
