Code

Merge branch 'mg/http-auth'
authorJunio C Hamano <gitster@pobox.com>
Thu, 26 Mar 2009 07:27:59 +0000 (00:27 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 Mar 2009 07:27:59 +0000 (00:27 -0700)
* mg/http-auth:
  http-push.c: use a faux remote to pass to http_init
  Do not name "repo" struct "remote" in push_http.c
  http.c: CURLOPT_NETRC_OPTIONAL is not available in ancient versions of cURL
  http authentication via prompts
  http_init(): Fix config file parsing
  http.c: style cleanups

Conflicts:
http-push.c

1  2 
http-push.c

diff --cc http-push.c
index e6bd01a516082985637eba3eaaab629e5ab5fef8,962934858e93422f102ff869dd40730709d5824a..6ce5a1d550d4cf781673c62599bd681fc5e318b5
@@@ -1616,8 -1616,8 +1616,8 @@@ static int locking_available(void
                        }
                        XML_ParserFree(parser);
                        if (!lock_flags)
 -                              error("Error: no DAV locking support on %s",
 +                              error("no DAV locking support on %s",
-                                     remote->url);
+                                     repo->url);
  
                } else {
                        error("Cannot access URL %s, return code %d",
@@@ -2127,7 -2195,8 +2127,8 @@@ int main(int argc, char **argv
        int rc = 0;
        int i;
        int new_refs;
 -      struct ref *ref;
 +      struct ref *ref, *local_refs;
+       struct remote *remote;
        char *rewritten_url = NULL;
  
        git_extract_argv0_path(argv[0]);
        sigchain_push_common(remove_locks_on_signal);
  
        /* Check whether the remote has server info files */
-       remote->can_update_info_refs = 0;
-       remote->has_info_refs = remote_exists("info/refs");
-       remote->has_info_packs = remote_exists("objects/info/packs");
-       if (remote->has_info_refs) {
+       repo->can_update_info_refs = 0;
+       repo->has_info_refs = remote_exists("info/refs");
+       repo->has_info_packs = remote_exists("objects/info/packs");
+       if (repo->has_info_refs) {
                info_ref_lock = lock_remote("info/refs", LOCK_TIME);
                if (info_ref_lock)
-                       remote->can_update_info_refs = 1;
+                       repo->can_update_info_refs = 1;
                else {
 -                      fprintf(stderr, "Error: cannot lock existing info/refs\n");
 +                      error("cannot lock existing info/refs");
                        rc = 1;
                        goto cleanup;
                }