mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Change the git progress update callback signature
This way we can include additional text. This will be used in later patches. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8b710f4d6c
commit
eea1ff6a83
4 changed files with 25 additions and 12 deletions
|
@ -22,9 +22,9 @@
|
|||
|
||||
bool is_subsurface_cloud = false;
|
||||
|
||||
int (*update_progress_cb)(int) = NULL;
|
||||
int (*update_progress_cb)(int, const char *) = NULL;
|
||||
|
||||
void set_git_update_cb(int(*cb)(int))
|
||||
void set_git_update_cb(int(*cb)(int, const char *))
|
||||
{
|
||||
update_progress_cb = cb;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ static int update_progress(int percent)
|
|||
static int last_percent = -10;
|
||||
int ret = 0;
|
||||
if (update_progress_cb)
|
||||
ret = (*update_progress_cb)(percent);
|
||||
ret = (*update_progress_cb)(percent, "");
|
||||
if (verbose && percent - 10 >= last_percent) {
|
||||
last_percent = percent;
|
||||
fprintf(stderr, "git progress %d%%\n", percent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue