blob: 3a945637c81c22734b563325b66956ee4fb33b0b [file] [log] [blame]
Junio C Hamanoe0173ad2007-04-28 23:38:52 -07001#ifndef PROGRESS_H
2#define PROGRESS_H
Ævar Arnfjörð Bjarmason74900a62022-02-03 22:40:18 +01003#include "gettext.h"
Nicolas Pitre96a02f82007-04-18 14:27:45 -04004
Nicolas Pitredc6a0752007-10-30 14:57:32 -04005struct progress;
Nicolas Pitre96a02f82007-04-18 14:27:45 -04006
Đoàn Trần Công Danh3cacb9a2020-04-27 21:22:37 +07007#ifdef GIT_TEST_PROGRESS_ONLY
8
9extern int progress_testing;
10extern uint64_t progress_test_ns;
11void progress_test_force_update(void);
12
13#endif
14
Elijah Newrend6861d02017-11-13 12:15:58 -080015void display_throughput(struct progress *progress, uint64_t total);
SZEDER Gábor9219d122019-04-05 02:45:36 +020016void display_progress(struct progress *progress, uint64_t n);
Elijah Newrend6861d02017-11-13 12:15:58 -080017struct progress *start_progress(const char *title, uint64_t total);
Jeff Hostetler9d81ecb2019-03-21 12:36:11 -070018struct progress *start_sparse_progress(const char *title, uint64_t total);
Elijah Newrend6861d02017-11-13 12:15:58 -080019struct progress *start_delayed_progress(const char *title, uint64_t total);
Jeff Hostetler9d81ecb2019-03-21 12:36:11 -070020struct progress *start_delayed_sparse_progress(const char *title,
21 uint64_t total);
Ævar Arnfjörð Bjarmasona02014b2022-02-03 22:40:15 +010022void stop_progress_msg(struct progress **p_progress, const char *msg);
Ævar Arnfjörð Bjarmason74900a62022-02-03 22:40:18 +010023static inline void stop_progress(struct progress **p_progress)
24{
25 stop_progress_msg(p_progress, _("done"));
26}
Nicolas Pitre96a02f82007-04-18 14:27:45 -040027#endif