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>
This commit is contained in:
Dirk Hohndel 2016-02-12 22:01:20 -08:00
parent afb57bf741
commit 9367613a77

View file

@ -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;
}
/*