Code

Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Tue, 4 Mar 2008 08:34:39 +0000 (00:34 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 4 Mar 2008 08:34:39 +0000 (00:34 -0800)
* 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()

1  2 
builtin-ls-remote.c
http.c

diff --combined builtin-ls-remote.c
index 023754986e347a9529d6295d600f665f32f14577,720280e3900dc65a5063306a55880b8bc1330c2a..8907a89d6c3914f4652ef387776f581015778396
@@@ -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 8e554c09694456acc96dd9ba70c44870cb89f25d,c7deccb6de6a8a57a2fb57734f05d6ffdc6ae9dc..256a5f15f40a8d9389560e1fb08e34a56e9f7140
--- 1/http.c
--- 2/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
  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;
        }
  
        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)