mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add option to not check the remote when loading from git storage
This way we can first load from cache and then update from the network in the background. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3a670f8c3b
commit
83bd46cf79
2 changed files with 6 additions and 0 deletions
|
@ -462,6 +462,11 @@ int sync_with_remote(git_repository *repo, const char *remote, const char *branc
|
||||||
char *proxy_string;
|
char *proxy_string;
|
||||||
git_config *conf;
|
git_config *conf;
|
||||||
|
|
||||||
|
if (prefs.git_local_only) {
|
||||||
|
if (verbose)
|
||||||
|
fprintf(stderr, "don't sync with remote - read from cache only\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (verbose)
|
if (verbose)
|
||||||
fprintf(stderr, "sync with remote %s[%s]\n", remote, branch);
|
fprintf(stderr, "sync with remote %s[%s]\n", remote, branch);
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,7 @@ struct preferences {
|
||||||
short conservatism_level;
|
short conservatism_level;
|
||||||
int time_threshold;
|
int time_threshold;
|
||||||
int distance_threshold;
|
int distance_threshold;
|
||||||
|
bool git_local_only;
|
||||||
};
|
};
|
||||||
enum unit_system_values {
|
enum unit_system_values {
|
||||||
METRIC,
|
METRIC,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue