summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-12 12:32:12 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-12 13:56:23 -0700
commite21cae2d46db8148dc294c2dff08d9321274f815 (patch)
tree3c96b90a46cc43534bc332aa1157cdb62c8a5ec5 /dive.h
parent492369b3125b2c1c91f134c360110440b03d33b6 (diff)
downloadsubsurface-e21cae2d46db8148dc294c2dff08d9321274f815.tar.gz
Cloud storage: sync the remote after save
This change once again tests if the remote can be reached. Even with a fairly big data file and a medium speed internet connection the remote sync is fast enough to call it nearly instantaneous. Maybe a couple of seconds. We may need more checks / different heuristics / warnings if the sync didn't happen, etc. But for now this should allow more reasonable testing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/dive.h b/dive.h
index 8e54c3d73..d4ceb76e0 100644
--- a/dive.h
+++ b/dive.h
@@ -671,8 +671,9 @@ extern void save_one_dive_to_mb(struct membuffer *b, struct dive *dive);
struct git_oid;
struct git_repository;
#define dummy_git_repository ((git_repository *)3ul) /* Random bogus pointer, not NULL */
-extern struct git_repository *is_git_repository(const char *filename, const char **branchp);
-extern int git_save_dives(struct git_repository *, const char *, bool select_only);
+extern struct git_repository *is_git_repository(const char *filename, const char **branchp, const char **remote);
+extern int sync_with_remote(struct git_repository *repo, const char *remote, const char *branch);
+extern int git_save_dives(struct git_repository *, const char *, const char *remote, bool select_only);
extern int git_load_dives(struct git_repository *, const char *);
extern const char *saved_git_id;
extern void clear_git_id(void);