From bb7e4739712e3f9eee0dfd60088b6d8983067960 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Tue, 30 May 2017 10:30:42 -0700 Subject: 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 Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- notes-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'notes-utils.c') diff --git a/notes-utils.c b/notes-utils.c index 325ff3daa3..7d7c22b435 100644 --- a/notes-utils.c +++ b/notes-utils.c @@ -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; } -- cgit v1.2.1 From 5ee8a954e0191be2a144afdda6e37ef776730246 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Tue, 30 May 2017 10:30:43 -0700 Subject: 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 Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- notes-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'notes-utils.c') diff --git a/notes-utils.c b/notes-utils.c index 7d7c22b435..b2aada90a2 100644 --- a/notes-utils.c +++ b/notes-utils.c @@ -160,7 +160,7 @@ int copy_note_for_rewrite(struct notes_rewrite_cfg *c, int ret = 0; int i; for (i = 0; c->trees[i]; i++) - ret = copy_note(c->trees[i], from_obj->hash, to_obj->hash, 1, c->combine) || ret; + ret = copy_note(c->trees[i], from_obj, to_obj, 1, c->combine) || ret; return ret; } -- cgit v1.2.1