refs.c: allow listing and deleting badly named refs
[gitweb.git] / notes-cache.c
index c36a960bc32a9bfa0d5da83b1f7c8cb6a315b17d..c4e9bb7f6c0bde97c7c6d34094baa5ef7e318157 100644 (file)
@@ -56,10 +56,11 @@ int notes_cache_write(struct notes_cache *c)
 
        if (write_notes_tree(&c->tree, tree_sha1))
                return -1;
-       if (commit_tree(c->validity, tree_sha1, NULL, commit_sha1, NULL, NULL) < 0)
+       if (commit_tree(c->validity, strlen(c->validity), tree_sha1, NULL,
+                       commit_sha1, NULL, NULL) < 0)
                return -1;
        if (update_ref("update notes cache", c->tree.ref, commit_sha1, NULL,
-                      0, QUIET_ON_ERR) < 0)
+                      0, UPDATE_REFS_QUIET_ON_ERR) < 0)
                return -1;
 
        return 0;