diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-04-05 22:51:09 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-05 22:57:16 -0700 |
commit | 3555cadb77ca25fcf4883a5f1506e83222d6b29d (patch) | |
tree | 41c397e941e99d9aa052890dc18a6ded40ffb40c /core/git-access.h | |
parent | 8b670c3f3f937ca7b491e3e44f462a86b1509f53 (diff) | |
download | subsurface-3555cadb77ca25fcf4883a5f1506e83222d6b29d.tar.gz |
QML UI: don't fetch the remote twice when loading
We first check the sha to see if we want to load at all. But at that
point we already have the repository and the branch and we have synced
with the remote. So when we decide that we need to reload from storage,
we don't need to repeat those steps, instead we can go directly to the
git load.
For that to work we need to pass the repository pointer and the branch
name back to the caller so that we can directly call git_load_dives().
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/git-access.h')
-rw-r--r-- | core/git-access.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/git-access.h b/core/git-access.h index 3a0c5160a..6dbc22488 100644 --- a/core/git-access.h +++ b/core/git-access.h @@ -15,6 +15,7 @@ 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, const char **remote, bool dry_run); +extern int check_git_sha(const char *filename, git_repository **git_p, const char **branch_p); extern int sync_with_remote(struct git_repository *repo, const char *remote, const char *branch, enum remote_transport rt); 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 *); |