tree-diff: allow diff_tree_sha1 to accept NULL sha1
[gitweb.git] / send-pack.c
index cdcdea7a75b7c4728d638edc112dc5d88ea20e16..6129b0fd8e8e1961ab4c74de4f421c41c7786b42 100644 (file)
@@ -110,7 +110,7 @@ static int receive_status(int in, struct ref *refs)
        struct ref *hint;
        int ret = 0;
        char *line = packet_read_line(in, NULL);
-       if (prefixcmp(line, "unpack "))
+       if (!starts_with(line, "unpack "))
                return error("did not receive remote status");
        if (strcmp(line, "unpack ok")) {
                error("unpack failed: %s", line + 7);
@@ -123,7 +123,7 @@ static int receive_status(int in, struct ref *refs)
                line = packet_read_line(in, NULL);
                if (!line)
                        break;
-               if (prefixcmp(line, "ok ") && prefixcmp(line, "ng ")) {
+               if (!starts_with(line, "ok ") && !starts_with(line, "ng ")) {
                        error("invalid ref status from remote: %s", line);
                        ret = -1;
                        break;
@@ -222,6 +222,8 @@ int send_pack(struct send_pack_args *args,
                quiet_supported = 1;
        if (server_supports("agent"))
                agent_supported = 1;
+       if (server_supports("no-thin"))
+               args->use_thin_pack = 0;
 
        if (!remote_refs) {
                fprintf(stderr, "No refs in common and none specified; doing nothing.\n"