From 54ec332c2ff2e1c853a8b55b3aa55419b718e709 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 20 Sep 2015 08:41:21 -0700 Subject: [PATCH] Cloud storage: verbose output to console If Subsurface is started with the verbose flag, also give progress information on the consol (just in case there are issues with the progress dialog). Signed-off-by: Dirk Hohndel --- git-access.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git-access.c b/git-access.c index 69ff5aaad..4c5244a36 100644 --- a/git-access.c +++ b/git-access.c @@ -56,9 +56,14 @@ void set_git_update_cb(int(*cb)(int)) static int update_progress(int percent) { + static int last_percent = -10; int ret = 0; if (update_progress_cb) ret = (*update_progress_cb)(percent); + if (verbose && percent - 10 >= last_percent) { + last_percent = percent; + fprintf(stderr, "git progress %d%%\n", percent); + } return ret; }