Git fork
at reftables-rust 32 lines 991 B view raw
1#ifndef PROGRESS_H 2#define PROGRESS_H 3#include "gettext.h" 4 5struct progress; 6struct repository; 7 8#ifdef GIT_TEST_PROGRESS_ONLY 9 10extern int progress_testing; 11extern uint64_t progress_test_ns; 12void progress_test_force_update(void); 13 14#endif 15 16void display_throughput(struct progress *progress, uint64_t total); 17void display_progress(struct progress *progress, uint64_t n); 18struct progress *start_progress(struct repository *r, 19 const char *title, uint64_t total); 20struct progress *start_sparse_progress(struct repository *r, 21 const char *title, uint64_t total); 22struct progress *start_delayed_progress(struct repository *r, 23 const char *title, uint64_t total); 24struct progress *start_delayed_sparse_progress(struct repository *r, 25 const char *title, 26 uint64_t total); 27void stop_progress_msg(struct progress **p_progress, const char *msg); 28static inline void stop_progress(struct progress **p_progress) 29{ 30 stop_progress_msg(p_progress, _("done")); 31} 32#endif