Remove unnecessary 'fetch' argument from transport_get API

We don't actually need to know at the time of transport_get if the
caller wants to fetch, push, or do both on the returned object.
It is easier to just delay the initialization of the HTTP walker
until we know we will need it by providing a CURL specific fetch
function in the curl_transport that makes sure the walker instance
is initialized before use.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Shawn O. Pearce
2007-09-15 03:23:14 -04:00
committed by Junio C Hamano
parent be6042cfa5
commit e5f4e21463
4 changed files with 20 additions and 11 deletions

View File

@ -496,7 +496,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
else
remote = remote_get(argv[i++]);
transport = transport_get(remote, remote->uri[0], 1);
transport = transport_get(remote, remote->uri[0]);
if (verbose >= 2)
transport->verbose = 1;
if (quiet)