builtin/notes: convert to struct object_id
[gitweb.git] / notes-cache.c
index 2843e985760ae2b48f2f8103c573cee92fc1c350..6e84a748f0ed69046fe8c8814e58311d72598283 100644 (file)
@@ -69,15 +69,15 @@ int notes_cache_write(struct notes_cache *c)
 char *notes_cache_get(struct notes_cache *c, struct object_id *key_oid,
                      size_t *outsize)
 {
-       const unsigned char *value_sha1;
+       const struct object_id *value_oid;
        enum object_type type;
        char *value;
        unsigned long size;
 
-       value_sha1 = get_note(&c->tree, key_oid->hash);
-       if (!value_sha1)
+       value_oid = get_note(&c->tree, key_oid->hash);
+       if (!value_oid)
                return NULL;
-       value = read_sha1_file(value_sha1, &type, &size);
+       value = read_sha1_file(value_oid->hash, &type, &size);
 
        *outsize = size;
        return value;