Skip to content

Commit 2879bc3

Browse files
glandiumgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9874fca commit 2879bc3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

transport-helper.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ static void do_take_over(struct transport *transport)
9898
free(data);
9999
}
100100

101+
static void standard_options(struct transport *t);
102+
101103
static struct child_process *get_helper(struct transport *transport)
102104
{
103105
struct helper_data *data = transport->data;
@@ -212,6 +214,7 @@ static struct child_process *get_helper(struct transport *transport)
212214
strbuf_release(&buf);
213215
if (debug)
214216
fprintf(stderr, "Debug: Capabilities complete.\n");
217+
standard_options(transport);
215218
return data->helper;
216219
}
217220

@@ -339,7 +342,6 @@ static int fetch_with_fetch(struct transport *transport,
339342
int i;
340343
struct strbuf buf = STRBUF_INIT;
341344

342-
standard_options(transport);
343345
if (data->check_connectivity &&
344346
data->transport_options.check_self_contained_and_connected)
345347
set_helper_option(transport, "check-connectivity", "true");
@@ -824,7 +826,6 @@ static int push_refs_with_push(struct transport *transport,
824826
return 0;
825827
}
826828

827-
standard_options(transport);
828829
for_each_string_list_item(cas_option, &cas_options)
829830
set_helper_option(transport, "cas", cas_option->string);
830831

0 commit comments

Comments
 (0)