diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-02-12 22:01:20 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-02-12 22:01:20 -0800 |
commit | 9367613a77ec62577ca9aebf6c1dcc90294e7419 (patch) | |
tree | 10faf9538321c8f456d872092490ce466c825e91 /subsurface-core/git-access.c | |
parent | afb57bf7412de3168f65027345588d4ce20aa40c (diff) | |
download | subsurface-9367613a77ec62577ca9aebf6c1dcc90294e7419.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/git-access.c')
-rw-r--r-- | subsurface-core/git-access.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; + } /* |