diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-05-30 10:30:43 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-02 09:36:06 +0900 |
commit | 5ee8a954e0191be2a144afdda6e37ef776730246 (patch) | |
tree | 65d17044e181df1d635870d630086f249df84dde /notes-cache.c | |
parent | bb7e4739712e3f9eee0dfd60088b6d8983067960 (diff) | |
download | git-5ee8a954e0191be2a144afdda6e37ef776730246.tar.gz |
notes: convert some accessor functions to struct object_id
Convert add_note, get_note, and copy_note to take struct object_id.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes-cache.c')
-rw-r--r-- | notes-cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/notes-cache.c b/notes-cache.c index 6e84a748f0..29b4cede5f 100644 --- a/notes-cache.c +++ b/notes-cache.c @@ -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); } |