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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-06-13 13:16:08 -07:00
parent 7b7568b1ba
commit 3d62f89bce
2 changed files with 8 additions and 0 deletions

6
file.c
View file

@ -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;

View file

@ -1,6 +1,8 @@
#ifndef GITACCESS_H
#define GITACCESS_H
#include "git2.h"
#ifdef __cplusplus
extern "C" {
#else