summaryrefslogtreecommitdiffstats
path: root/core/git-access.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-08 12:28:43 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-08 12:29:17 -0700
commita1ec0d672493d1bb5e05042b1e0a05fce8ba42e4 (patch)
treec7d6b74b2ba519fced857c20bc8be4379257d6f6 /core/git-access.c
parente2e4bb6c2ac52c7df99d4284389fb490fcabe588 (diff)
downloadsubsurface-a1ec0d672493d1bb5e05042b1e0a05fce8ba42e4.tar.gz
git storage: only sync with remote if git_local_only isn't set
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/git-access.c')
-rw-r--r--core/git-access.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/git-access.c b/core/git-access.c
index 1547dd654..2b7fa0ca2 100644
--- a/core/git-access.c
+++ b/core/git-access.c
@@ -602,7 +602,9 @@ static git_repository *update_local_repo(const char *localdir, const char *remot
report_error("Unable to open git cache repository at %s: %s", localdir, giterr_last()->message);
return NULL;
}
- sync_with_remote(repo, remote, branch, rt);
+ if (!prefs.git_local_only)
+ sync_with_remote(repo, remote, branch, rt);
+
return repo;
}