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 /remote-testsvn.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 'remote-testsvn.c')
-rw-r--r-- | remote-testsvn.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/remote-testsvn.c b/remote-testsvn.c index 017af1bd5f..8e8d5c7947 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; |