summaryrefslogtreecommitdiff
path: root/remote-testsvn.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-05-30 17:30:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-02 00:36:06 (GMT)
commit490bc83a01acfefa11e98f8852b1f4a9dd962331 (patch)
tree7c081deb55030427a81677559fd80f2a47cbb06e /remote-testsvn.c
parent89c149f55b93e052e46e46ebc4d7e76b0b25a90c (diff)
downloadgit-490bc83a01acfefa11e98f8852b1f4a9dd962331.zip
git-490bc83a01acfefa11e98f8852b1f4a9dd962331.tar.gz
git-490bc83a01acfefa11e98f8852b1f4a9dd962331.tar.bz2
notes: convert for_each_note to struct object_id
Convert for_each_note and each of the callbacks to use 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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/remote-testsvn.c b/remote-testsvn.c
index f87bf85..793c4ad 100644
--- a/remote-testsvn.c
+++ b/remote-testsvn.c
@@ -99,8 +99,8 @@ static int parse_rev_note(const char *msg, struct rev_note *res)
return -1;
}
-static int note2mark_cb(const unsigned char *object_sha1,
- const unsigned char *note_sha1, char *note_path,
+static int note2mark_cb(const struct object_id *object_oid,
+ const struct object_id *note_oid, char *note_path,
void *cb_data)
{
FILE *file = (FILE *)cb_data;
@@ -109,14 +109,14 @@ static int note2mark_cb(const unsigned char *object_sha1,
enum object_type type;
struct rev_note note;
- if (!(msg = read_sha1_file(note_sha1, &type, &msglen)) ||
+ if (!(msg = read_sha1_file(note_oid->hash, &type, &msglen)) ||
!msglen || type != OBJ_BLOB) {
free(msg);
return 1;
}
if (parse_rev_note(msg, &note))
return 2;
- if (fprintf(file, ":%d %s\n", note.rev_nr, sha1_to_hex(object_sha1)) < 1)
+ if (fprintf(file, ":%d %s\n", note.rev_nr, oid_to_hex(object_oid)) < 1)
return 3;
return 0;
}