]> Pileus Git - ~andy/git/commitdiff
Merge branch 'jk/http-auth-redirects' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 8 Nov 2013 19:37:25 +0000 (11:37 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Nov 2013 19:37:26 +0000 (11:37 -0800)
We did not handle cases where http transport gets redirected during
the authorization request (e.g. from http:// to https://).

* jk/http-auth-redirects:
  http.c: Spell the null pointer as NULL
  remote-curl: rewrite base url from info/refs redirects
  remote-curl: store url as a strbuf
  remote-curl: make refs_url a strbuf
  http: update base URLs when we see redirects
  http: provide effective url to callers
  http: hoist credential request out of handle_curl_result
  http: refactor options to http_get_*
  http_request: factor out curlinfo_strbuf
  http_get_file: style fixes

1  2 
http-push.c

diff --combined http-push.c
index cde6416d37751fe0724e7c021e858530a74cf466,09ebb8f48c80dac22bd5c7cab77e1cfcf19933ed..b1e74d2086b8e0dee261358622016f6613249fcf
@@@ -1543,7 -1543,7 +1543,7 @@@ static int remote_exists(const char *pa
  
        sprintf(url, "%s%s", repo->url, path);
  
-       switch (http_get_strbuf(url, NULL, NULL, 0)) {
+       switch (http_get_strbuf(url, NULL, NULL)) {
        case HTTP_OK:
                ret = 1;
                break;
@@@ -1567,7 -1567,7 +1567,7 @@@ static void fetch_symref(const char *pa
        url = xmalloc(strlen(repo->url) + strlen(path) + 1);
        sprintf(url, "%s%s", repo->url, path);
  
-       if (http_get_strbuf(url, NULL, &buffer, 0) != HTTP_OK)
+       if (http_get_strbuf(url, &buffer, NULL) != HTTP_OK)
                die("Couldn't get %s for remote symref\n%s", url,
                    curl_errorstr);
        free(url);
@@@ -1976,7 -1976,7 +1976,7 @@@ int main(int argc, char **argv
                pushing = 0;
                if (prepare_revision_walk(&revs))
                        die("revision walk setup failed");
 -              mark_edges_uninteresting(revs.commits, &revs, NULL);
 +              mark_edges_uninteresting(&revs, NULL);
                objects_to_send = get_delta(&revs, ref_lock);
                finish_all_active_slots();