files_for_each_reflog_ent_reverse(): close stream and free strbuf on error
[gitweb.git] / sha1_name.c
index 7f754b60c48d2a10c6562f1c63e79c366a5cd3a1..26ceec1d799afad6c6831cba00ca4d0ffab7979f 100644 (file)
@@ -1319,7 +1319,7 @@ void strbuf_branchname(struct strbuf *sb, const char *name, unsigned allowed)
 
 int strbuf_check_branch_ref(struct strbuf *sb, const char *name)
 {
-       strbuf_branchname(sb, name, 0);
+       strbuf_branchname(sb, name, INTERPRET_BRANCH_LOCAL);
        if (name[0] == '-')
                return -1;
        strbuf_splice(sb, 0, 0, "refs/heads/", 11);