git storage: only sync with remote if git_local_only isn't set

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-04-08 12:28:43 -07:00
parent e2e4bb6c2a
commit a1ec0d6724
2 changed files with 4 additions and 2 deletions

View file

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