mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 20:26:17 +00:00
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:
parent
7b7568b1ba
commit
3d62f89bce
2 changed files with 8 additions and 0 deletions
6
file.c
6
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;
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef GITACCESS_H
|
||||
#define GITACCESS_H
|
||||
|
||||
#include "git2.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue