diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-12-03 03:32:38 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-03 04:38:49 +0100 |
commit | 93e5e048f84138a632b239632c9b45ae238cdf1c (patch) | |
tree | c36bf96685b1dee17310963333b7d6f2bb2e6db5 /refs.h | |
parent | refs: move ref name helpers around (diff) | |
download | git-93e5e048f84138a632b239632c9b45ae238cdf1c.tar.xz 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 'refs.h')
-rw-r--r-- | refs.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -191,23 +191,23 @@ char *repo_default_branch_name(struct repository *r, int quiet); * If "allowed" is non-zero, restrict the set of allowed expansions. See * repo_interpret_branch_name() for details. */ -void strbuf_branchname(struct strbuf *sb, const char *name, +void copy_branchname(struct strbuf *sb, const char *name, unsigned allowed); /* - * Like strbuf_branchname() above, but confirm that the result is + * Like copy_branchname() above, but confirm that the result is * syntactically valid to be used as a local branch name in refs/heads/. * * The return value is "0" if the result is valid, and "-1" otherwise. */ -int strbuf_check_branch_ref(struct strbuf *sb, const char *name); +int check_branch_ref(struct strbuf *sb, const char *name); /* * Similar for a tag name in refs/tags/. * * The return value is "0" if the result is valid, and "-1" otherwise. */ -int strbuf_check_tag_ref(struct strbuf *sb, const char *name); +int check_tag_ref(struct strbuf *sb, const char *name); /* * A ref_transaction represents a collection of reference updates that |