{"thread":{"id":"18391","subject":"[PATCH 1/2] Changed remote in push_http.c to repo so it won't be confused with how remote is used else where in the system.","startedAt":"2009-03-18T23:43:53Z","lastAt":"2009-03-18T23:43:53Z","messageCount":1,"participants":["Amos King"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"108461","messageId":"d8c371a80903181643k3d4d7adwfc3fe3dcbc0c401f@mail.gmail.com","threadId":"18391","inReplyTo":null,"subject":"[PATCH 1/2] Changed remote in push_http.c to repo so it won't be confused with how remote is used else where in the system.","fromName":"Amos King","fromEmail":"amos.l.king@gmail.com","sentAt":"2009-03-18T23:43:53Z","receivedAt":"2009-03-18T23:43:53Z","isPatch":true,"sender":{"key":"amos.l.king@gmail.com","avatar":"https://gravatar.com/avatar/764a302e2d39acef19662089f068068e8ea0e4313091f66b3c855dfc57950e29?d=mp&s=160"},"body":"This patch is a first step in getting http-push to use http\nauthentication via prompts.  The patch renames remote to repo so that\nit doesn't get confusing with the same remote that is passed around\nwhen using http.\n\nThis is just recreating a patch from Junio that I couldn't get to apply locally.\n\nSigned-off-by: Amos King <amos.l.king@gmail.com>\n---\n http-push.c |  154 +++++++++++++++++++++++++++++-----------------------------\n 1 files changed, 77 insertions(+), 77 deletions(-)\n\ndiff --git a/http-push.c b/http-push.c\nindex 48e5f38..9ac2664 100644\n--- a/http-push.c\n+++ b/http-push.c\n@@ -97,7 +97,7 @@ struct repo\n \tstruct remote_lock *locks;\n };\n\n-static struct repo *remote;\n+static struct repo *repo;\n\n enum transfer_state {\n \tNEED_FETCH,\n@@ -324,7 +324,7 @@ static void start_fetch_loose(struct\ntransfer_request *request)\n\n \tgit_SHA1_Init(&request->c);\n\n-\turl = get_remote_object_url(remote->url, hex, 0);\n+\turl = get_remote_object_url(repo->url, hex, 0);\n \trequest->url = xstrdup(url);\n\n \t/* If a previous temp file is present, process what was already\n@@ -389,7 +389,7 @@ static void start_fetch_loose(struct\ntransfer_request *request)\n \trequest->state = RUN_FETCH_LOOSE;\n \tif (!start_active_slot(slot)) {\n \t\tfprintf(stderr, \"Unable to start GET request\\n\");\n-\t\tremote->can_update_info_refs = 0;\n+\t\trepo->can_update_info_refs = 0;\n \t\trelease_request(request);\n \t}\n }\n@@ -399,7 +399,7 @@ static void start_mkcol(struct transfer_request *request)\n \tchar *hex = sha1_to_hex(request->obj->sha1);\n \tstruct active_request_slot *slot;\n\n-\trequest->url = get_remote_object_url(remote->url, hex, 1);\n+\trequest->url = get_remote_object_url(repo->url, hex, 1);\n\n \tslot = get_active_slot();\n \tslot->callback_func = process_response;\n@@ -434,10 +434,10 @@ static void start_fetch_packed(struct\ntransfer_request *request)\n \tstruct transfer_request *check_request = request_queue_head;\n \tstruct active_request_slot *slot;\n\n-\ttarget = find_sha1_pack(request->obj->sha1, remote->packs);\n+\ttarget = find_sha1_pack(request->obj->sha1, repo->packs);\n \tif (!target) {\n \t\tfprintf(stderr, \"Unable to fetch %s, will not be able to update\nserver info refs\\n\", sha1_to_hex(request->obj->sha1));\n-\t\tremote->can_update_info_refs = 0;\n+\t\trepo->can_update_info_refs = 0;\n \t\trelease_request(request);\n \t\treturn;\n \t}\n@@ -450,9 +450,9 @@ static void start_fetch_packed(struct\ntransfer_request *request)\n \tsnprintf(request->tmpfile, sizeof(request->tmpfile),\n \t\t \"%s.temp\", filename);\n\n-\turl = xmalloc(strlen(remote->url) + 64);\n+\turl = xmalloc(strlen(repo->url) + 64);\n \tsprintf(url, \"%sobjects/pack/pack-%s.pack\",\n-\t\tremote->url, sha1_to_hex(target->sha1));\n+\t\trepo->url, sha1_to_hex(target->sha1));\n\n \t/* Make sure there isn't another open request for this pack */\n \twhile (check_request) {\n@@ -469,7 +469,7 @@ static void start_fetch_packed(struct\ntransfer_request *request)\n \tif (!packfile) {\n \t\tfprintf(stderr, \"Unable to open local file %s for pack\",\n \t\t\trequest->tmpfile);\n-\t\tremote->can_update_info_refs = 0;\n+\t\trepo->can_update_info_refs = 0;\n \t\tfree(url);\n \t\treturn;\n \t}\n@@ -505,7 +505,7 @@ static void start_fetch_packed(struct\ntransfer_request *request)\n \trequest->state = RUN_FETCH_PACKED;\n \tif (!start_active_slot(slot)) {\n \t\tfprintf(stderr, \"Unable to start GET request\\n\");\n-\t\tremote->can_update_info_refs = 0;\n+\t\trepo->can_update_info_refs = 0;\n \t\trelease_request(request);\n \t}\n }\n@@ -554,10 +554,10 @@ static void start_put(struct transfer_request *request)\n \trequest->buffer.buf.len = stream.total_out;\n\n \tstrbuf_addstr(&buf, \"Destination: \");\n-\tappend_remote_object_url(&buf, remote->url, hex, 0);\n+\tappend_remote_object_url(&buf, repo->url, hex, 0);\n \trequest->dest = strbuf_detach(&buf, NULL);\n\n-\tappend_remote_object_url(&buf, remote->url, hex, 0);\n+\tappend_remote_object_url(&buf, repo->url, hex, 0);\n \tstrbuf_add(&buf, request->lock->tmpfile_suffix, 41);\n \trequest->url = strbuf_detach(&buf, NULL);\n\n@@ -648,7 +648,7 @@ static int refresh_lock(struct remote_lock *lock)\n\n static void check_locks(void)\n {\n-\tstruct remote_lock *lock = remote->locks;\n+\tstruct remote_lock *lock = repo->locks;\n \ttime_t current_time = time(NULL);\n \tint time_remaining;\n\n@@ -788,7 +788,7 @@ static void finish_request(struct transfer_request *request)\n \t\tif (request->curl_result != CURLE_OK) {\n \t\t\tfprintf(stderr, \"Unable to get pack file %s\\n%s\",\n \t\t\t\trequest->url, curl_errorstr);\n-\t\t\tremote->can_update_info_refs = 0;\n+\t\t\trepo->can_update_info_refs = 0;\n \t\t} else {\n \t\t\toff_t pack_size = ftell(request->local_stream);\n\n@@ -798,7 +798,7 @@ static void finish_request(struct transfer_request *request)\n \t\t\t\t\t       request->filename)) {\n \t\t\t\ttarget = (struct packed_git *)request->userData;\n \t\t\t\ttarget->pack_size = pack_size;\n-\t\t\t\tlst = &remote->packs;\n+\t\t\t\tlst = &repo->packs;\n \t\t\t\twhile (*lst != target)\n \t\t\t\t\tlst = &((*lst)->next);\n \t\t\t\t*lst = (*lst)->next;\n@@ -806,7 +806,7 @@ static void finish_request(struct transfer_request *request)\n \t\t\t\tif (!verify_pack(target))\n \t\t\t\t\tinstall_packed_git(target);\n \t\t\t\telse\n-\t\t\t\t\tremote->can_update_info_refs = 0;\n+\t\t\t\t\trepo->can_update_info_refs = 0;\n \t\t\t}\n \t\t}\n \t\trelease_request(request);\n@@ -889,7 +889,7 @@ static int add_send_request(struct object *obj,\nstruct remote_lock *lock)\n \t\tget_remote_object_list(obj->sha1[0]);\n \tif (obj->flags & (REMOTE | PUSHING))\n \t\treturn 0;\n-\ttarget = find_sha1_pack(obj->sha1, remote->packs);\n+\ttarget = find_sha1_pack(obj->sha1, repo->packs);\n \tif (target) {\n \t\tobj->flags |= REMOTE;\n \t\treturn 0;\n@@ -930,8 +930,8 @@ static int fetch_index(unsigned char *sha1)\n \tstruct slot_results results;\n\n \t/* Don't use the index if the pack isn't there */\n-\turl = xmalloc(strlen(remote->url) + 64);\n-\tsprintf(url, \"%sobjects/pack/pack-%s.pack\", remote->url, hex);\n+\turl = xmalloc(strlen(repo->url) + 64);\n+\tsprintf(url, \"%sobjects/pack/pack-%s.pack\", repo->url, hex);\n \tslot = get_active_slot();\n \tslot->results = &results;\n \tcurl_easy_setopt(slot->curl, CURLOPT_URL, url);\n@@ -956,7 +956,7 @@ static int fetch_index(unsigned char *sha1)\n \tif (push_verbosely)\n \t\tfprintf(stderr, \"Getting index for pack %s\\n\", hex);\n\n-\tsprintf(url, \"%sobjects/pack/pack-%s.idx\", remote->url, hex);\n+\tsprintf(url, \"%sobjects/pack/pack-%s.idx\", repo->url, hex);\n\n \tfilename = sha1_pack_index_name(sha1);\n \tsnprintf(tmpfile, sizeof(tmpfile), \"%s.temp\", filename);\n@@ -1018,8 +1018,8 @@ static int setup_index(unsigned char *sha1)\n \t\treturn -1;\n\n \tnew_pack = parse_pack_index(sha1);\n-\tnew_pack->next = remote->packs;\n-\tremote->packs = new_pack;\n+\tnew_pack->next = repo->packs;\n+\trepo->packs = new_pack;\n \treturn 0;\n }\n\n@@ -1037,8 +1037,8 @@ static int fetch_indices(void)\n \tif (push_verbosely)\n \t\tfprintf(stderr, \"Getting pack list\\n\");\n\n-\turl = xmalloc(strlen(remote->url) + 20);\n-\tsprintf(url, \"%sobjects/info/packs\", remote->url);\n+\turl = xmalloc(strlen(repo->url) + 20);\n+\tsprintf(url, \"%sobjects/info/packs\", repo->url);\n\n \tslot = get_active_slot();\n \tslot->results = &results;\n@@ -1223,11 +1223,11 @@ static struct remote_lock *lock_remote(const\nchar *path, long timeout)\n \tstruct curl_slist *dav_headers = NULL;\n \tstruct xml_ctx ctx;\n\n-\turl = xmalloc(strlen(remote->url) + strlen(path) + 1);\n-\tsprintf(url, \"%s%s\", remote->url, path);\n+\turl = xmalloc(strlen(repo->url) + strlen(path) + 1);\n+\tsprintf(url, \"%s%s\", repo->url, path);\n\n \t/* Make sure leading directories exist for the remote ref */\n-\tep = strchr(url + strlen(remote->url) + 1, '/');\n+\tep = strchr(url + strlen(repo->url) + 1, '/');\n \twhile (ep) {\n \t\tchar saved_character = ep[1];\n \t\tep[1] = '\\0';\n@@ -1319,8 +1319,8 @@ static struct remote_lock *lock_remote(const\nchar *path, long timeout)\n \t} else {\n \t\tlock->url = url;\n \t\tlock->start_time = time(NULL);\n-\t\tlock->next = remote->locks;\n-\t\tremote->locks = lock;\n+\t\tlock->next = repo->locks;\n+\t\trepo->locks = lock;\n \t}\n\n \treturn lock;\n@@ -1330,7 +1330,7 @@ static int unlock_remote(struct remote_lock *lock)\n {\n \tstruct active_request_slot *slot;\n \tstruct slot_results results;\n-\tstruct remote_lock *prev = remote->locks;\n+\tstruct remote_lock *prev = repo->locks;\n \tstruct curl_slist *dav_headers;\n \tint rc = 0;\n\n@@ -1356,8 +1356,8 @@ static int unlock_remote(struct remote_lock *lock)\n\n \tcurl_slist_free_all(dav_headers);\n\n-\tif (remote->locks == lock) {\n-\t\tremote->locks = lock->next;\n+\tif (repo->locks == lock) {\n+\t\trepo->locks = lock->next;\n \t} else {\n \t\twhile (prev && prev->next != lock)\n \t\t\tprev = prev->next;\n@@ -1375,9 +1375,9 @@ static int unlock_remote(struct remote_lock *lock)\n\n static void remove_locks(void)\n {\n-\tstruct remote_lock *lock = remote->locks;\n+\tstruct remote_lock *lock = repo->locks;\n\n-\tfprintf(stderr, \"Removing remote locks...\\n\");\n+\tfprintf(stderr, \"Removing repo locks...\\n\");\n \twhile (lock) {\n \t\tunlock_remote(lock);\n \t\tlock = lock->next;\n@@ -1457,7 +1457,7 @@ static void handle_remote_ls_ctx(struct xml_ctx\n*ctx, int tag_closed)\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (path) {\n-\t\t\t\tpath += remote->path_len;\n+\t\t\t\tpath += repo->path_len;\n \t\t\t\tls->dentry_name = xstrdup(path);\n \t\t\t}\n \t\t} else if (!strcmp(ctx->name, DAV_PROPFIND_COLLECTION)) {\n@@ -1480,7 +1480,7 @@ static void remote_ls(const char *path, int flags,\n \t\t      void (*userFunc)(struct remote_ls_ctx *ls),\n \t\t      void *userData)\n {\n-\tchar *url = xmalloc(strlen(remote->url) + strlen(path) + 1);\n+\tchar *url = xmalloc(strlen(repo->url) + strlen(path) + 1);\n \tstruct active_request_slot *slot;\n \tstruct slot_results results;\n \tstruct strbuf in_buffer = STRBUF_INIT;\n@@ -1496,7 +1496,7 @@ static void remote_ls(const char *path, int flags,\n \tls.userData = userData;\n \tls.userFunc = userFunc;\n\n-\tsprintf(url, \"%s%s\", remote->url, path);\n+\tsprintf(url, \"%s%s\", repo->url, path);\n\n \tstrbuf_addf(&out_buffer.buf, PROPFIND_ALL_REQUEST);\n\n@@ -1574,7 +1574,7 @@ static int locking_available(void)\n \tstruct xml_ctx ctx;\n \tint lock_flags = 0;\n\n-\tstrbuf_addf(&out_buffer.buf, PROPFIND_SUPPORTEDLOCK_REQUEST, remote->url);\n+\tstrbuf_addf(&out_buffer.buf, PROPFIND_SUPPORTEDLOCK_REQUEST, repo->url);\n\n \tdav_headers = curl_slist_append(dav_headers, \"Depth: 0\");\n \tdav_headers = curl_slist_append(dav_headers, \"Content-Type: text/xml\");\n@@ -1586,7 +1586,7 @@ static int locking_available(void)\n \tcurl_easy_setopt(slot->curl, CURLOPT_READFUNCTION, fread_buffer);\n \tcurl_easy_setopt(slot->curl, CURLOPT_FILE, &in_buffer);\n \tcurl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, fwrite_buffer);\n-\tcurl_easy_setopt(slot->curl, CURLOPT_URL, remote->url);\n+\tcurl_easy_setopt(slot->curl, CURLOPT_URL, repo->url);\n \tcurl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 1);\n \tcurl_easy_setopt(slot->curl, CURLOPT_CUSTOMREQUEST, DAV_PROPFIND);\n \tcurl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, dav_headers);\n@@ -1617,15 +1617,15 @@ static int locking_available(void)\n \t\t\tXML_ParserFree(parser);\n \t\t\tif (!lock_flags)\n \t\t\t\terror(\"Error: no DAV locking support on %s\",\n-\t\t\t\t      remote->url);\n+\t\t\t\t      repo->url);\n\n \t\t} else {\n \t\t\terror(\"Cannot access URL %s, return code %d\",\n-\t\t\t      remote->url, results.curl_result);\n+\t\t\t      repo->url, results.curl_result);\n \t\t\tlock_flags = 0;\n \t\t}\n \t} else {\n-\t\terror(\"Unable to start PROPFIND request on %s\", remote->url);\n+\t\terror(\"Unable to start PROPFIND request on %s\", repo->url);\n \t}\n\n \tstrbuf_release(&out_buffer.buf);\n@@ -1801,10 +1801,10 @@ static void one_remote_ref(char *refname)\n\n \tref = alloc_ref(refname);\n\n-\tif (http_fetch_ref(remote->url, ref) != 0) {\n+\tif (http_fetch_ref(repo->url, ref) != 0) {\n \t\tfprintf(stderr,\n \t\t\t\"Unable to fetch ref %s from %s\\n\",\n-\t\t\trefname, remote->url);\n+\t\t\trefname, repo->url);\n \t\tfree(ref);\n \t\treturn;\n \t}\n@@ -1813,7 +1813,7 @@ static void one_remote_ref(char *refname)\n \t * Fetch a copy of the object if it doesn't exist locally - it\n \t * may be required for updating server info later.\n \t */\n-\tif (remote->can_update_info_refs && !has_sha1_file(ref->old_sha1)) {\n+\tif (repo->can_update_info_refs && !has_sha1_file(ref->old_sha1)) {\n \t\tobj = lookup_unknown_object(ref->old_sha1);\n \t\tif (obj) {\n \t\t\tfprintf(stderr,\t\"  fetch %s for %s\\n\",\n@@ -1853,10 +1853,10 @@ static void add_remote_info_ref(struct\nremote_ls_ctx *ls)\n\n \tref = alloc_ref(ls->dentry_name);\n\n-\tif (http_fetch_ref(remote->url, ref) != 0) {\n+\tif (http_fetch_ref(repo->url, ref) != 0) {\n \t\tfprintf(stderr,\n \t\t\t\"Unable to fetch ref %s from %s\\n\",\n-\t\t\tls->dentry_name, remote->url);\n+\t\t\tls->dentry_name, repo->url);\n \t\taborted = 1;\n \t\tfree(ref);\n \t\treturn;\n@@ -1931,12 +1931,12 @@ static void update_remote_info_refs(struct\nremote_lock *lock)\n\n static int remote_exists(const char *path)\n {\n-\tchar *url = xmalloc(strlen(remote->url) + strlen(path) + 1);\n+\tchar *url = xmalloc(strlen(repo->url) + strlen(path) + 1);\n \tstruct active_request_slot *slot;\n \tstruct slot_results results;\n \tint ret = -1;\n\n-\tsprintf(url, \"%s%s\", remote->url, path);\n+\tsprintf(url, \"%s%s\", repo->url, path);\n\n \tslot = get_active_slot();\n \tslot->results = &results;\n@@ -1966,8 +1966,8 @@ static void fetch_symref(const char *path, char\n**symref, unsigned char *sha1)\n \tstruct active_request_slot *slot;\n \tstruct slot_results results;\n\n-\turl = xmalloc(strlen(remote->url) + strlen(path) + 1);\n-\tsprintf(url, \"%s%s\", remote->url, path);\n+\turl = xmalloc(strlen(repo->url) + strlen(path) + 1);\n+\tsprintf(url, \"%s%s\", repo->url, path);\n\n \tslot = get_active_slot();\n \tslot->results = &results;\n@@ -2082,7 +2082,7 @@ static int delete_remote_branch(char *pattern, int force)\n \t\t\t\t     \"of your current HEAD.\\n\"\n \t\t\t\t     \"If you are sure you want to delete it,\"\n \t\t\t\t     \" run:\\n\\t'git http-push -D %s %s'\",\n-\t\t\t\t     remote_ref->name, remote->url, pattern);\n+\t\t\t\t     remote_ref->name, repo->url, pattern);\n \t\t}\n \t}\n\n@@ -2090,8 +2090,8 @@ static int delete_remote_branch(char *pattern, int force)\n \tfprintf(stderr, \"Removing remote branch '%s'\\n\", remote_ref->name);\n \tif (dry_run)\n \t\treturn 0;\n-\turl = xmalloc(strlen(remote->url) + strlen(remote_ref->name) + 1);\n-\tsprintf(url, \"%s%s\", remote->url, remote_ref->name);\n+\turl = xmalloc(strlen(repo->url) + strlen(remote_ref->name) + 1);\n+\tsprintf(url, \"%s%s\", repo->url, remote_ref->name);\n \tslot = get_active_slot();\n \tslot->results = &results;\n \tcurl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);\n@@ -2134,7 +2134,7 @@ int main(int argc, char **argv)\n\n \tsetup_git_directory();\n\n-\tremote = xcalloc(sizeof(*remote), 1);\n+\trepo = xcalloc(sizeof(*repo), 1);\n\n \targv++;\n \tfor (i = 1; i < argc; i++, argv++) {\n@@ -2167,14 +2167,14 @@ int main(int argc, char **argv)\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t}\n-\t\tif (!remote->url) {\n+\t\tif (!repo->url) {\n \t\t\tchar *path = strstr(arg, \"//\");\n-\t\t\tremote->url = arg;\n-\t\t\tremote->path_len = strlen(arg);\n+\t\t\trepo->url = arg;\n+\t\t\trepo->path_len = strlen(arg);\n \t\t\tif (path) {\n-\t\t\t\tremote->path = strchr(path+2, '/');\n-\t\t\t\tif (remote->path)\n-\t\t\t\t\tremote->path_len = strlen(remote->path);\n+\t\t\t\trepo->path = strchr(path+2, '/');\n+\t\t\t\tif (repo->path)\n+\t\t\t\t\trepo->path_len = strlen(repo->path);\n \t\t\t}\n \t\t\tcontinue;\n \t\t}\n@@ -2187,7 +2187,7 @@ int main(int argc, char **argv)\n \tdie(\"git-push is not available for http/https repository when not\ncompiled with USE_CURL_MULTI\");\n #endif\n\n-\tif (!remote->url)\n+\tif (!repo->url)\n \t\tusage(http_push_usage);\n\n \tif (delete_branch && nr_refspec != 1)\n@@ -2199,13 +2199,13 @@ int main(int argc, char **argv)\n\n \tno_pragma_header = curl_slist_append(no_pragma_header, \"Pragma:\");\n\n-\tif (remote->url && remote->url[strlen(remote->url)-1] != '/') {\n-\t\trewritten_url = xmalloc(strlen(remote->url)+2);\n-\t\tstrcpy(rewritten_url, remote->url);\n+\tif (repo->url && repo->url[strlen(repo->url)-1] != '/') {\n+\t\trewritten_url = xmalloc(strlen(repo->url)+2);\n+\t\tstrcpy(rewritten_url, repo->url);\n \t\tstrcat(rewritten_url, \"/\");\n-\t\tremote->path = rewritten_url + (remote->path - remote->url);\n-\t\tremote->path_len++;\n-\t\tremote->url = rewritten_url;\n+\t\trepo->path = rewritten_url + (repo->path - repo->url);\n+\t\trepo->path_len++;\n+\t\trepo->url = rewritten_url;\n \t}\n\n \t/* Verify DAV compliance/lock support */\n@@ -2217,20 +2217,20 @@ int main(int argc, char **argv)\n \tsigchain_push_common(remove_locks_on_signal);\n\n \t/* Check whether the remote has server info files */\n-\tremote->can_update_info_refs = 0;\n-\tremote->has_info_refs = remote_exists(\"info/refs\");\n-\tremote->has_info_packs = remote_exists(\"objects/info/packs\");\n-\tif (remote->has_info_refs) {\n+\trepo->can_update_info_refs = 0;\n+\trepo->has_info_refs = remote_exists(\"info/refs\");\n+\trepo->has_info_packs = remote_exists(\"objects/info/packs\");\n+\tif (repo->has_info_refs) {\n \t\tinfo_ref_lock = lock_remote(\"info/refs\", LOCK_TIME);\n \t\tif (info_ref_lock)\n-\t\t\tremote->can_update_info_refs = 1;\n+\t\t\trepo->can_update_info_refs = 1;\n \t\telse {\n \t\t\tfprintf(stderr, \"Error: cannot lock existing info/refs\\n\");\n \t\t\trc = 1;\n \t\t\tgoto cleanup;\n \t\t}\n \t}\n-\tif (remote->has_info_packs)\n+\tif (repo->has_info_packs)\n \t\tfetch_indices();\n\n \t/* Get a list of all local and remote heads to validate refspecs */\n@@ -2388,8 +2388,8 @@ int main(int argc, char **argv)\n \t}\n\n \t/* Update remote server info if appropriate */\n-\tif (remote->has_info_refs && new_refs) {\n-\t\tif (info_ref_lock && remote->can_update_info_refs) {\n+\tif (repo->has_info_refs && new_refs) {\n+\t\tif (info_ref_lock && repo->can_update_info_refs) {\n \t\t\tfprintf(stderr, \"Updating remote server info\\n\");\n \t\t\tif (!dry_run)\n \t\t\t\tupdate_remote_info_refs(info_ref_lock);\n@@ -2402,7 +2402,7 @@ int main(int argc, char **argv)\n \tfree(rewritten_url);\n \tif (info_ref_lock)\n \t\tunlock_remote(info_ref_lock);\n-\tfree(remote);\n+\tfree(repo);\n\n \tcurl_slist_free_all(no_pragma_header);\n\n-- \n1.6.2.GIT\n"}]}