parse_fetch: convert to use struct object_id
[gitweb.git] / connect.c
index ced4961398d397e0e21661ce7105be293c3585c2..d13a10a94c72a2d7e3272393fb5a1a502720e204 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -166,7 +166,7 @@ struct ref **get_remote_heads(int in, char *src_buf, size_t src_len,
                if (!check_ref(name, flags))
                        continue;
                ref = alloc_ref(buffer + 41);
-               hashcpy(ref->old_sha1, old_sha1);
+               hashcpy(ref->old_oid.hash, old_sha1);
                *list = ref;
                list = &ref->next;
                got_at_least_one_head = 1;
@@ -255,7 +255,7 @@ static const char *prot_name(enum protocol protocol)
                case PROTO_GIT:
                        return "git";
                default:
-                       return "unkown protocol";
+                       return "unknown protocol";
        }
 }
 
@@ -333,7 +333,7 @@ static const char *ai_name(const struct addrinfo *ai)
        static char addr[NI_MAXHOST];
        if (getnameinfo(ai->ai_addr, ai->ai_addrlen, addr, sizeof(addr), NULL, 0,
                        NI_NUMERICHOST) != 0)
-               strcpy(addr, "(unknown)");
+               xsnprintf(addr, sizeof(addr), "(unknown)");
 
        return addr;
 }