refs: convert peel_ref to struct object_id
[gitweb.git] / remote-testsvn.c
index e034ea00d49c81675d664085c0d67763609bfd8a..bcebb4c789567eb4017a3a0132ba55c59c427991 100644 (file)
@@ -66,8 +66,7 @@ static char *read_ref_note(const struct object_id *oid)
        else if (!msglen || type != OBJ_BLOB) {
                error("Note contains unusable content. "
                        "Is something else using this notes tree? %s", notes_ref);
-               free(msg);
-               msg = NULL;
+               FREE_AND_NULL(msg);
        }
        free_notes(NULL);
        return msg;
@@ -175,7 +174,7 @@ static int cmd_import(const char *line)
        struct child_process svndump_proc = CHILD_PROCESS_INIT;
        const char *command = "svnrdump";
 
-       if (read_ref(private_ref, head_oid.hash))
+       if (read_ref(private_ref, &head_oid))
                startrev = 0;
        else {
                note_msg = read_ref_note(&head_oid);