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 --- remote-testsvn.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'remote-testsvn.c') diff --git a/remote-testsvn.c b/remote-testsvn.c index 017af1bd5..8e8d5c794 100644 --- a/remote-testsvn.c +++ b/remote-testsvn.c @@ -51,7 +51,7 @@ static void terminate_batch(void) } /* NOTE: 'ref' refers to a git reference, while 'rev' refers to a svn revision. */ -static char *read_ref_note(const unsigned char sha1[20]) +static char *read_ref_note(const struct object_id *oid) { const struct object_id *note_oid; char *msg = NULL; @@ -59,7 +59,7 @@ static char *read_ref_note(const unsigned char sha1[20]) enum object_type type; init_notes(NULL, notes_ref, NULL, 0); - if (!(note_oid = get_note(NULL, sha1))) + if (!(note_oid = get_note(NULL, oid))) return NULL; /* note tree not found */ if (!(msg = read_sha1_file(note_oid->hash, &type, &msglen))) error("Empty notes tree. %s", notes_ref); @@ -174,15 +174,15 @@ static int cmd_import(const char *line) int code; int dumpin_fd; char *note_msg; - unsigned char head_sha1[20]; + struct object_id head_oid; unsigned int startrev; struct child_process svndump_proc = CHILD_PROCESS_INIT; const char *command = "svnrdump"; - if (read_ref(private_ref, head_sha1)) + if (read_ref(private_ref, head_oid.hash)) startrev = 0; else { - note_msg = read_ref_note(head_sha1); + note_msg = read_ref_note(&head_oid); if(note_msg == NULL) { warning("No note found for %s.", private_ref); startrev = 0; -- cgit v1.2.1