From 70d5e2d77b4c2afdb442b37924bc252793e106d9 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Fri, 15 Jul 2016 06:32:28 -0400 Subject: check_connected: add progress flag Connectivity checks have to traverse the entire object graph in the worst case (e.g., a full clone or a full push). For large repositories like linux.git, this can take 30-60 seconds, during which time git may produce little or no output. Let's add the option of showing progress, which is taken care of by rev-list. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- connected.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'connected.c') diff --git a/connected.c b/connected.c index 5f5c8bd826..8e3e4b1dc1 100644 --- a/connected.c +++ b/connected.c @@ -58,6 +58,9 @@ int check_connected(sha1_iterate_fn fn, void *cb_data, argv_array_push(&rev_list.args, "--not"); argv_array_push(&rev_list.args, "--all"); argv_array_push(&rev_list.args, "--quiet"); + if (opt->progress) + argv_array_pushf(&rev_list.args, "--progress=%s", + _("Checking connectivity")); rev_list.git_cmd = 1; rev_list.in = -1; -- cgit v1.2.3