summaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2020-03-03 20:55:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-03-03 21:15:40 (GMT)
commit7655b4119d49844e6ebc62da571e5f18528dbde8 (patch)
treeeda6264cd28cf2439f8982708b2f46a22564b5e6 /remote-curl.c
parentd0654dc308b0ba76dd8ed7bbb33c8d8f7aacd783 (diff)
downloadgit-7655b4119d49844e6ebc62da571e5f18528dbde8.zip
git-7655b4119d49844e6ebc62da571e5f18528dbde8.tar.gz
git-7655b4119d49844e6ebc62da571e5f18528dbde8.tar.bz2
remote-curl: show progress for fetches over dumb HTTP
Fetching over dumb HTTP transport doesn't show any progress, even with the option --progress. If the connection is slow or there is a lot of data to get then this can take a long time while the user is left to wonder if git got stuck. We don't know the number of objects to fetch at the outset, but we can count the ones we got. Show an open-ended progress indicator based on that number if the user asked for it. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/remote-curl.c b/remote-curl.c
index 350d92a..3ce85b6 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -1026,6 +1026,7 @@ static int fetch_dumb(int nr_heads, struct ref **to_fetch)
walker = get_http_walker(url.buf);
walker->get_verbosely = options.verbosity >= 3;
+ walker->get_progress = options.progress;
walker->get_recover = 0;
ret = walker_fetch(walker, nr_heads, targets, NULL, NULL);
walker_free(walker);