diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-02-25 15:40:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-02-25 15:40:20 -0800 |
commit | be94b339b698cf3ac869ef9666b82b75032add3a (patch) | |
tree | a337671fae7ae9afb5cb54d77a24d711f3c76867 /transport-helper.c | |
parent | 33a2eeaeade52afee9fb9ffdd2ae995acf3b7e4e (diff) | |
parent | aab1beb0e1a66d31b0a9896e8c13009dece0aa45 (diff) | |
download | git-be94b339b698cf3ac869ef9666b82b75032add3a.tar.gz |
Merge branch 'mh/transport-capabilities'
The transport-helper did not give transport options such as
verbosity, progress, cloning, etc. to import and export based
helpers, like it did for fetch and push based helpers, robbing them
the chance to honor the wish of the end-users better.
* mh/transport-capabilities:
transport-helper: ask the helper to set the same options for import as for fetch
transport-helper: ask the helper to set progress and verbosity options after asking for its capabilities
Diffstat (limited to 'transport-helper.c')
-rw-r--r-- | transport-helper.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/transport-helper.c b/transport-helper.c index 7dc4a443ae..5d99a6bc2e 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -97,6 +97,8 @@ static void do_take_over(struct transport *transport) free(data); } +static void standard_options(struct transport *t); + static struct child_process *get_helper(struct transport *transport) { struct helper_data *data = transport->data; @@ -211,6 +213,7 @@ static struct child_process *get_helper(struct transport *transport) strbuf_release(&buf); if (debug) fprintf(stderr, "Debug: Capabilities complete.\n"); + standard_options(transport); return data->helper; } @@ -338,17 +341,6 @@ static int fetch_with_fetch(struct transport *transport, int i; struct strbuf buf = STRBUF_INIT; - standard_options(transport); - if (data->check_connectivity && - data->transport_options.check_self_contained_and_connected) - set_helper_option(transport, "check-connectivity", "true"); - - if (transport->cloning) - set_helper_option(transport, "cloning", "true"); - - if (data->transport_options.update_shallow) - set_helper_option(transport, "update-shallow", "true"); - for (i = 0; i < nr_heads; i++) { const struct ref *posn = to_fetch[i]; if (posn->status & REF_STATUS_UPTODATE) @@ -622,6 +614,16 @@ static int fetch(struct transport *transport, if (!count) return 0; + if (data->check_connectivity && + data->transport_options.check_self_contained_and_connected) + set_helper_option(transport, "check-connectivity", "true"); + + if (transport->cloning) + set_helper_option(transport, "cloning", "true"); + + if (data->transport_options.update_shallow) + set_helper_option(transport, "update-shallow", "true"); + if (data->fetch) return fetch_with_fetch(transport, nr_heads, to_fetch); @@ -826,7 +828,6 @@ static int push_refs_with_push(struct transport *transport, return 0; } - standard_options(transport); for_each_string_list_item(cas_option, &cas_options) set_helper_option(transport, "cas", cas_option->string); |