From 9367613a77ec62577ca9aebf6c1dcc90294e7419 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 12 Feb 2016 22:01:20 -0800 Subject: Don't connect to remote if git_local_only is set If there was no local cache we still tried to connect to the remote, even with git_local_only set. Signed-off-by: Dirk Hohndel --- subsurface-core/git-access.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'subsurface-core') diff --git a/subsurface-core/git-access.c b/subsurface-core/git-access.c index 81952c89c..71491805c 100644 --- a/subsurface-core/git-access.c +++ b/subsurface-core/git-access.c @@ -680,7 +680,11 @@ static struct git_repository *get_remote_repo(const char *localdir, const char * } return update_local_repo(localdir, remote, branch, rt); } - return create_local_repo(localdir, remote, branch, rt); + if (!prefs.git_local_only) + return create_local_repo(localdir, remote, branch, rt); + else + return 0; + } /* -- cgit v1.2.3-70-g09d2