From: Junio C Hamano Date: Tue, 4 Mar 2008 08:34:39 +0000 (-0800) Subject: Merge branch 'maint' X-Git-Tag: v1.5.5-rc0~66 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/27b4070e40a771c41ed581ef1ac98dd43e58ab87?ds=inline;hp=-c Merge branch 'maint' * maint: Fix 'git remote show' regression on empty repository in 1.5.4 Fix incorrect wording in git-merge.txt. git-merge.sh: better handling of combined --squash,--no-ff,--no-commit options Fix random crashes in http_cleanup() --- 27b4070e40a771c41ed581ef1ac98dd43e58ab87 diff --combined builtin-ls-remote.c index 023754986e,720280e390..8907a89d6c --- a/builtin-ls-remote.c +++ b/builtin-ls-remote.c @@@ -94,11 -94,6 +94,8 @@@ int cmd_ls_remote(int argc, const char transport_set_option(transport, TRANS_OPT_UPLOADPACK, uploadpack); ref = transport_get_remote_refs(transport); - transport_disconnect(transport); - - if (!ref) ++ if (transport_disconnect(transport)) + return 1; - for ( ; ref; ref = ref->next) { if (!check_ref_type(ref, flags)) continue; diff --combined http.c index 8e554c0969,c7deccb6de..256a5f15f4 --- a/http.c +++ b/http.c @@@ -218,16 -218,13 +218,16 @@@ static CURL* get_curl_handle(void return result; } -void http_init(void) +void http_init(struct remote *remote) { char *low_speed_limit; char *low_speed_time; curl_global_init(CURL_GLOBAL_ALL); + if (remote && remote->http_proxy) + curl_http_proxy = xstrdup(remote->http_proxy); + pragma_header = curl_slist_append(pragma_header, "Pragma: no-cache"); #ifdef USE_CURL_MULTI @@@ -284,23 -281,15 +284,15 @@@ void http_cleanup(void) { struct active_request_slot *slot = active_queue_head; - #ifdef USE_CURL_MULTI - char *wait_url; - #endif while (slot != NULL) { struct active_request_slot *next = slot->next; + if (slot->curl != NULL) { #ifdef USE_CURL_MULTI - if (slot->in_use) { - curl_easy_getinfo(slot->curl, - CURLINFO_EFFECTIVE_URL, - &wait_url); - fprintf(stderr, "Waiting for %s\n", wait_url); - run_active_slot(slot); - } + curl_multi_remove_handle(curlm, slot->curl); #endif - if (slot->curl != NULL) curl_easy_cleanup(slot->curl); + } free(slot); slot = next; } @@@ -317,11 -306,6 +309,11 @@@ curl_slist_free_all(pragma_header); pragma_header = NULL; + + if (curl_http_proxy) { + free(curl_http_proxy); + curl_http_proxy = NULL; + } } struct active_request_slot *get_active_slot(void)