From 3d62f89bce967d43de0d6fb8ba5156371b4f293b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 13 Jun 2015 13:16:08 -0700 Subject: Cloud storage: Remove another git related message Once we failed to load data from cloud storage (for example the first time we try to use it when the remote repository is empty), don't show git related errors to the user. It's enough to tell them that the cloud storage is empty. Signed-off-by: Dirk Hohndel --- file.c | 6 ++++++ git-access.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/file.c b/file.c index bbb396169..f3c697b0d 100644 --- a/file.c +++ b/file.c @@ -428,6 +428,12 @@ int parse_file(const char *filename) int ret; git = is_git_repository(filename, &branch, NULL); + if (strstr(filename, "https://cloud.subsurface-divelog.org/git") + && git == dummy_git_repository) + /* opening the cloud storage repository failed for some reason + * give up here and don't send errors about git repositories */ + return 0; + if (git && !git_load_dives(git, branch)) return 0; diff --git a/git-access.h b/git-access.h index c0ff93d40..e1b72d100 100644 --- a/git-access.h +++ b/git-access.h @@ -1,6 +1,8 @@ #ifndef GITACCESS_H #define GITACCESS_H +#include "git2.h" + #ifdef __cplusplus extern "C" { #else -- cgit v1.2.3-70-g09d2