aboutsummaryrefslogtreecommitdiffstats
path: root/transport.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-09-05 09:34:43 +0200
committerJunio C Hamano <gitster@pobox.com>2021-09-07 10:59:23 -0700
commit7366096de9d3e4aee4b49dfdf0438a8636187a84 (patch)
tree4f22136f699462053d9264a91fc258e72e1a5b46 /transport.c
parent08342573792e9af79bf41b32c45ac471d25303bc (diff)
downloadgit-7366096de9d3e4aee4b49dfdf0438a8636187a84.tar.gz
bundle API: change "flags" to be "extra_index_pack_args"
Since the "flags" parameter was added in be042aff24c (Teach progress eye-candy to fetch_refs_from_bundle(), 2011-09-18) there's never been more than the one flag: BUNDLE_VERBOSE. Let's have the only caller who cares about that pass "-v" itself instead through new "extra_index_pack_args" parameter. The flexibility of being able to pass arbitrary arguments to "unbundle" will be used in a subsequent commit. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/transport.c b/transport.c
index 17e9629710..ab9b03ae9f 100644
--- a/transport.c
+++ b/transport.c
@@ -162,12 +162,16 @@ static int fetch_refs_from_bundle(struct transport *transport,
int nr_heads, struct ref **to_fetch)
{
struct bundle_transport_data *data = transport->data;
+ struct strvec extra_index_pack_args = STRVEC_INIT;
int ret;
+ if (transport->progress)
+ strvec_push(&extra_index_pack_args, "-v");
+
if (!data->get_refs_from_bundle_called)
get_refs_from_bundle(transport, 0, NULL);
ret = unbundle(the_repository, &data->header, data->fd,
- transport->progress ? BUNDLE_VERBOSE : 0);
+ &extra_index_pack_args);
transport->hash_algo = data->header.hash_algo;
return ret;
}