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);
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);
}