notes: convert for_each_note to struct object_id
[gitweb.git] / builtin / notes.c
index 7b891471c461ddc3cd2b9d3186cc8b005f68ca2b..53fe6d34d42cec1842ddacd596c74704c2658649 100644 (file)
@@ -109,11 +109,11 @@ static void free_note_data(struct note_data *d)
        strbuf_release(&d->buf);
 }
 
-static int list_each_note(const unsigned char *object_sha1,
-               const unsigned char *note_sha1, char *note_path,
+static int list_each_note(const struct object_id *object_oid,
+               const struct object_id *note_oid, char *note_path,
                void *cb_data)
 {
-       printf("%s %s\n", sha1_to_hex(note_sha1), sha1_to_hex(object_sha1));
+       printf("%s %s\n", oid_to_hex(note_oid), oid_to_hex(object_oid));
        return 0;
 }
 
@@ -706,7 +706,7 @@ static int merge_commit(struct notes_merge_options *o)
 
        if (get_oid("NOTES_MERGE_PARTIAL", &oid))
                die(_("failed to read ref NOTES_MERGE_PARTIAL"));
-       else if (!(partial = lookup_commit_reference(oid.hash)))
+       else if (!(partial = lookup_commit_reference(&oid)))
                die(_("could not find commit from NOTES_MERGE_PARTIAL."));
        else if (parse_commit(partial))
                die(_("could not parse commit from NOTES_MERGE_PARTIAL."));