]> git.ipfire.org Git - thirdparty/git.git/blobdiff - notes-cache.c
notes: convert some accessor functions to struct object_id
[thirdparty/git.git] / notes-cache.c
index 6e84a748f0ed69046fe8c8814e58311d72598283..29b4cede5f8d539416d0af22f31b0aabc0e28c46 100644 (file)
@@ -74,7 +74,7 @@ char *notes_cache_get(struct notes_cache *c, struct object_id *key_oid,
        char *value;
        unsigned long size;
 
-       value_oid = get_note(&c->tree, key_oid->hash);
+       value_oid = get_note(&c->tree, key_oid);
        if (!value_oid)
                return NULL;
        value = read_sha1_file(value_oid->hash, &type, &size);
@@ -90,5 +90,5 @@ int notes_cache_put(struct notes_cache *c, struct object_id *key_oid,
 
        if (write_sha1_file(data, size, "blob", value_oid.hash) < 0)
                return -1;
-       return add_note(&c->tree, key_oid->hash, value_oid.hash, NULL);
+       return add_note(&c->tree, key_oid, &value_oid, NULL);
 }