gpg: close stderr once finished with it in verify_signed_buffer()
[gitweb.git] / sha1_name.c
index 653b0659be8416a220268ed2bc60694140c8d472..ba976b48398d4be0635746bcabb5b1c881e77ae8 100644 (file)
@@ -966,9 +966,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);
 }
 
 /*