]> git.ipfire.org Git - thirdparty/git.git/blobdiff - notes-cache.c
The sixth batch
[thirdparty/git.git] / notes-cache.c
index 0e1d5b1ac7a48d9bda8f76091a55be7c527e68cc..038db01ca049e993bfb5b6f90eb9dd740e87f8cb 100644 (file)
@@ -17,7 +17,7 @@ static int notes_cache_match_validity(struct repository *r,
        struct strbuf msg = STRBUF_INIT;
        int ret;
 
-       if (read_ref(ref, &oid) < 0)
+       if (refs_read_ref(get_main_ref_store(the_repository), ref, &oid) < 0)
                return 0;
 
        commit = lookup_commit_reference_gently(r, &oid, 1);
@@ -66,8 +66,8 @@ int notes_cache_write(struct notes_cache *c)
        if (commit_tree(c->validity, strlen(c->validity), &tree_oid, NULL,
                        &commit_oid, NULL, NULL) < 0)
                return -1;
-       if (update_ref("update notes cache", c->tree.update_ref, &commit_oid,
-                      NULL, 0, UPDATE_REFS_QUIET_ON_ERR) < 0)
+       if (refs_update_ref(get_main_ref_store(the_repository), "update notes cache", c->tree.update_ref, &commit_oid,
+                           NULL, 0, UPDATE_REFS_QUIET_ON_ERR) < 0)
                return -1;
 
        return 0;