зеркало из https://github.com/microsoft/git.git
transport-helper: ask the helper to set progress and verbosity options after asking for its capabilities
Currently, a remote helper is only told about the progress and verbosity options for the 'fetch' and 'push' commands. This means a remote helper that implements 'import' and 'export' can never know the user requested progress or verbosity (or lack thereof) through the command line. Telling the remote helper about those options after asking for its capabilities ensures it can act accordingly for all commands. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
9874fca712
Коммит
2879bc3b0c
|
@ -98,6 +98,8 @@ static void do_take_over(struct transport *transport)
|
||||||
free(data);
|
free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void standard_options(struct transport *t);
|
||||||
|
|
||||||
static struct child_process *get_helper(struct transport *transport)
|
static struct child_process *get_helper(struct transport *transport)
|
||||||
{
|
{
|
||||||
struct helper_data *data = transport->data;
|
struct helper_data *data = transport->data;
|
||||||
|
@ -212,6 +214,7 @@ static struct child_process *get_helper(struct transport *transport)
|
||||||
strbuf_release(&buf);
|
strbuf_release(&buf);
|
||||||
if (debug)
|
if (debug)
|
||||||
fprintf(stderr, "Debug: Capabilities complete.\n");
|
fprintf(stderr, "Debug: Capabilities complete.\n");
|
||||||
|
standard_options(transport);
|
||||||
return data->helper;
|
return data->helper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,7 +342,6 @@ static int fetch_with_fetch(struct transport *transport,
|
||||||
int i;
|
int i;
|
||||||
struct strbuf buf = STRBUF_INIT;
|
struct strbuf buf = STRBUF_INIT;
|
||||||
|
|
||||||
standard_options(transport);
|
|
||||||
if (data->check_connectivity &&
|
if (data->check_connectivity &&
|
||||||
data->transport_options.check_self_contained_and_connected)
|
data->transport_options.check_self_contained_and_connected)
|
||||||
set_helper_option(transport, "check-connectivity", "true");
|
set_helper_option(transport, "check-connectivity", "true");
|
||||||
|
@ -824,7 +826,6 @@ static int push_refs_with_push(struct transport *transport,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
standard_options(transport);
|
|
||||||
for_each_string_list_item(cas_option, &cas_options)
|
for_each_string_list_item(cas_option, &cas_options)
|
||||||
set_helper_option(transport, "cas", cas_option->string);
|
set_helper_option(transport, "cas", cas_option->string);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче