aboutsummaryrefslogtreecommitdiff
path: root/strbuf.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-11-06 06:46:52 -0500
committerJunio C Hamano <gitster@pobox.com>2010-11-10 11:07:04 -0800
commit6bab74e7fb89b7427e5ef24b48a07fe9450c40e7 (patch)
treedf81e3ebbc067e2639d68b77481bda367aa4f772 /strbuf.c
parent33f239365cce2682a1faac0d5670d684aa1981ad (diff)
downloadgit-6bab74e7fb89b7427e5ef24b48a07fe9450c40e7.tar.gz
git-6bab74e7fb89b7427e5ef24b48a07fe9450c40e7.tar.xz
strbuf: move strbuf_branchname to sha1_name.c
strbuf_branchname is a thin wrapper around interpret_branch_name from sha1_name.o. Most strbuf.o users do not need it. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'strbuf.c')
-rw-r--r--strbuf.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/strbuf.c b/strbuf.c
index 65b4cf434..9b3c4457f 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -386,21 +386,3 @@ int strbuf_read_file(struct strbuf *sb, const char *path, size_t hint)
return len;
}
-
-int strbuf_branchname(struct strbuf *sb, const char *name)
-{
- int len = strlen(name);
- if (interpret_branch_name(name, sb) == len)
- return 0;
- strbuf_add(sb, name, len);
- return len;
-}
-
-int strbuf_check_branch_ref(struct strbuf *sb, const char *name)
-{
- strbuf_branchname(sb, name);
- if (name[0] == '-')
- return CHECK_REF_FORMAT_ERROR;
- strbuf_splice(sb, 0, 0, "refs/heads/", 11);
- return check_ref_format(sb->buf);
-}