]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sha1_name.c
Change check_ref_format() to take a flags argument
[thirdparty/git.git] / sha1_name.c
index ff5992acc971ac5a67fa3d4def1e0c064b90519f..143fd97ede19194617f1d9b808ec8eb7cd189c5b 100644 (file)
@@ -972,9 +972,9 @@ int strbuf_check_branch_ref(struct strbuf *sb, const char *name)
 {
        strbuf_branchname(sb, name);
        if (name[0] == '-')
-               return CHECK_REF_FORMAT_ERROR;
+               return -1;
        strbuf_splice(sb, 0, 0, "refs/heads/", 11);
-       return check_ref_format(sb->buf);
+       return check_refname_format(sb->buf, 0);
 }
 
 /*