X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=http-push.c;h=cdfdd4f79199261b2a62012381728d676484e424;hb=dbdc07fcbe3a951df8a3869b42edb6fffd466486;hp=44f814cda2a9756a55cb7f332d5fef0e5484256b;hpb=afb6b561e3dad13df5d9df9731751a3d310c0854;p=git.git diff --git a/http-push.c b/http-push.c index 44f814cda..cdfdd4f79 100644 --- a/http-push.c +++ b/http-push.c @@ -1747,7 +1747,6 @@ int main(int argc, char **argv) int i; int new_refs; struct ref *ref, *local_refs; - struct remote *remote; git_extract_argv0_path(argv[0]); @@ -1821,14 +1820,7 @@ int main(int argc, char **argv) memset(remote_dir_exists, -1, 256); - /* - * Create a minimum remote by hand to give to http_init(), - * primarily to allow it to look at the URL. - */ - remote = xcalloc(sizeof(*remote), 1); - ALLOC_GROW(remote->url, remote->url_nr + 1, remote->url_alloc); - remote->url[remote->url_nr++] = repo->url; - http_init(remote); + http_init(NULL, repo->url, 1); #ifdef USE_CURL_MULTI is_running_queue = 0; @@ -1877,8 +1869,8 @@ int main(int argc, char **argv) } /* match them up */ - if (match_refs(local_refs, &remote_refs, - nr_refspec, (const char **) refspec, push_all)) { + if (match_push_refs(local_refs, &remote_refs, + nr_refspec, (const char **) refspec, push_all)) { rc = -1; goto cleanup; }