Code

Merge branch 'jc/maint-verify-objects-remove-pessimism' into maint-1.7.8
[git.git] / remote-curl.c
index b780ba5ca8c713b7231835df8a63e452b41a0598..25c1af7ab7d0f92321106466cbab3b6632b98252 100644 (file)
@@ -200,7 +200,7 @@ static struct ref *parse_git_refs(struct discovery *heads, int for_push)
 
        if (start_async(&async))
                die("cannot start thread to parse advertised refs");
-       get_remote_heads(async.out, &list, 0, NULL,
+       get_remote_heads(async.out, &list,
                        for_push ? REF_NORMAL : 0, NULL);
        close(async.out);
        if (finish_async(&async))
@@ -805,7 +805,7 @@ static int push(int nr_spec, char **specs)
 static void parse_push(struct strbuf *buf)
 {
        char **specs = NULL;
-       int alloc_spec = 0, nr_spec = 0, i;
+       int alloc_spec = 0, nr_spec = 0, i, ret;
 
        do {
                if (!prefixcmp(buf->buf, "push ")) {
@@ -822,12 +822,13 @@ static void parse_push(struct strbuf *buf)
                        break;
        } while (1);
 
-       if (push(nr_spec, specs))
-               exit(128); /* error already reported */
-
+       ret = push(nr_spec, specs);
        printf("\n");
        fflush(stdout);
 
+       if (ret)
+               exit(128); /* error already reported */
+
  free_specs:
        for (i = 0; i < nr_spec; i++)
                free(specs[i]);
@@ -860,7 +861,7 @@ int main(int argc, const char **argv)
 
        url = strbuf_detach(&buf, NULL);
 
-       http_init(remote, url);
+       http_init(remote, url, 0);
 
        do {
                if (strbuf_getline(&buf, stdin, '\n') == EOF) {