diff mbox series

[4/4] preload-index: fix "Refreshing index" progress line

Message ID 20210623215736.8279-5-szeder.dev@gmail.com (mailing list archive)
State New, archived
Headers show
Series WIP/POC check isatty(2)-protected progress lines | expand

Commit Message

SZEDER Gábor June 23, 2021, 9:57 p.m. UTC
---
 preload-index.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/preload-index.c b/preload-index.c
index aae6e4a042..757dbeced6 100644
--- a/preload-index.c
+++ b/preload-index.c
@@ -86,7 +86,8 @@  static void *preload_thread(void *_data)
 		struct progress_data *pd = p->progress;
 
 		pthread_mutex_lock(&pd->mutex);
-		display_progress(pd->progress, pd->n + last_nr);
+		pd->n += last_nr;
+		display_progress(pd->progress, pd->n);
 		pthread_mutex_unlock(&pd->mutex);
 	}
 	cache_def_clear(&cache);