builtin/notes: convert to struct object_id

Convert most of the static functions to use struct object_id.  In
addition, convert copy_notes_for_rewrite and its callers.

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>
This commit is contained in:
brian m. carlson
2017-05-30 10:30:42 -07:00
committed by Junio C Hamano
parent fb61e4d3ab
commit bb7e473971
5 changed files with 60 additions and 60 deletions

View File

@ -155,12 +155,12 @@ struct notes_rewrite_cfg *init_copy_notes_for_rewrite(const char *cmd)
}
int copy_note_for_rewrite(struct notes_rewrite_cfg *c,
const unsigned char *from_obj, const unsigned char *to_obj)
const struct object_id *from_obj, const struct object_id *to_obj)
{
int ret = 0;
int i;
for (i = 0; c->trees[i]; i++)
ret = copy_note(c->trees[i], from_obj, to_obj, 1, c->combine) || ret;
ret = copy_note(c->trees[i], from_obj->hash, to_obj->hash, 1, c->combine) || ret;
return ret;
}